+ Reply to Thread
Results 1 to 5 of 5

VBA/IE button clicking issue

  1. #1
    Forum Contributor
    Join Date
    08-16-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    132

    VBA/IE button clicking issue

    Hi there,

    I have the following code:

    Please Login or Register  to view this content.
    The code itself works fine - it cycles through the webpage looking for input elements with the value of "submit", and when it finds one, it clicks it.

    My issue is that I've cycled through all of the available INPUT elements on the page I'm trying to sign in to, and the actual element that controls me logging in is this:

    Please Login or Register  to view this content.
    So it's a button that says "go", and the actual btnInput.Value of this button is null. If I change the macro to read:

    Please Login or Register  to view this content.
    then it will "click" on the first null input that it finds, which unfortunately, is not the login element. I'm confused as to how to "click" on this when it has no label, and when it's about the 4th or 5th element on the page that has no label.

  2. #2
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: VBA/IE button clicking issue

    Try this,

    Please Login or Register  to view this content.
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  3. #3
    Forum Contributor
    Join Date
    08-16-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    132

    Re: VBA/IE button clicking issue

    Nice - this worked!

    If I'm simply defining btnInput earlier as an Object - how does VBA understand things like:

    btnInput.src ?

    What allows that .src to contain a value? What other things can I put after btnInput?

  4. #4
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: VBA/IE button clicking issue

    All properties and methods of that object are exposed. When you refer this object.

  5. #5
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: VBA/IE button clicking issue

    check this for more on html tags. http://www.w3schools.com/tags/tag_input.asp

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to get table just clicking a list down button
    By Mahadev87 in forum Excel General
    Replies: 0
    Last Post: 03-01-2013, 10:30 AM
  2. [SOLVED] clicking a button on a promt box VBA
    By mike02 in forum Excel General
    Replies: 5
    Last Post: 08-03-2012, 11:59 AM
  3. [SOLVED] How do I run the macro for a button click without clicking the button?
    By flyboy54 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-12-2012, 10:45 AM
  4. Trouble clicking a button in IE using VBA
    By DC83 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-06-2012, 05:16 PM
  5. add line by clicking button
    By festo in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-23-2010, 06:18 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1