+ Reply to Thread
Results 1 to 6 of 6

Web button click

  1. #1
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Web button click

    Hi,
    just started playing about with vba and HTML.
    Can someone give me a clue how to click the button Continue

    Please Login or Register  to view this content.
    Currently using this code which gets to the site and enters a registration, now all need to do is hit the blue continue button

    Please Login or Register  to view this content.
    Regards
    Sean

    Please add to my reputation if you think i helped
    (click on the star below the post)
    Mark threads as "Solved" if you have your answer
    (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code:
    [code] Your code here [code]
    Please supply a workbook containing example Data:
    It makes its easier to answer your problem & saves time!

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Web button click

    Hello Sean,

    It is so nice to Sean spelled correctly. Anyway, to answer your question see the code below.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Web button click

    Thanks Leith,
    I have managed to overcome that part now, but I click the button and then wait for the page to refresh, then try pulling the data from the scource code.
    I have found the data on the new scource code, but I am having trouble with resetting the new page as the HTMLdocument.
    It keeps searching the old htmldocument
    this is my code for this part

    Please Login or Register  to view this content.
    cant seem to get it to work.
    Also if I have IE open already it causes problems finding the right browser
    I tried this
    Please Login or Register  to view this content.
    it works by checking each window, but only if I have the message boxes in use, when I comment them out it doesn't find the page.
    is it because it is halting the code long enough for the page to refresh properly?
    im rather stuck.
    when this works I can then pull the inner text out.
    appreciate any help you can give me.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Web button click

    Hello Sean,

    I suspect that the refreshed page is using a Frame object. The Frame is itself a separate HTML document embedded within the main document. Look through the main page's source code for any Frame or IFrame objects.

    You can access the Frame's document object like this...
    Please Login or Register  to view this content.
    NOTE: The Frame object has a Name property that may be useful when looping through the Frames to find the frame you want.

    You can now pull elements from frmDoc like you would with HTMLDoc.

  5. #5
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Web button click

    Cheers Leith I shall give it a go

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Web button click

    Hello Sean,

    Sometimes the Frame document is used as a place holder for the data. The server will update the Frame document by inserting code into and then executing the new page. If the site does this way, you will not be able to gain access to the new page. VBA will only allow you client side access. To see the updated Frame document, you would need server side access.

    Sealbh ort!

+ 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. [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
  2. Call button click event from a button on anther sheet
    By ajaykgarg in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-25-2010, 09:27 AM
  3. Click No Button?
    By Dr.Ile in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-30-2007, 09:58 AM
  4. [SOLVED] Create floating button based on button click in menu
    By ExcelMonkey in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-12-2005, 02:05 PM
  5. On Button Click(Help!)
    By jpizzle in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-03-2005, 06:32 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