+ Reply to Thread
Results 1 to 2 of 2

Automating IE using VBA

  1. #1
    Registered User
    Join Date
    07-20-2006
    Posts
    7

    Automating IE using VBA

    Hi,

    Just wondered if you know the answer to my question.

    I want to run a search in IE using VBA, however the search I am conducting comes in more than one part. (i.e. the first search returns another webpage that requires a further search entry to be entered) I can perform the first search but then I do not know how to focus on the new displayed webpage to conduct the next search.

    Any ideas?

    Here is my code so far

    Sub using_IE6_From_Excel2()
    Dim IeApp As Object
    Dim web_page_name As String
    '
    Set IeApp = CreateObject("internetexplorer.application")
    '
    IeApp.Visible = True
    '
    web_page_name = "http://www.voa.gov.uk/cti/InitS.asp?lcn=0"
    IeApp.Navigate2 web_page_name
    '
    Do
    Loop Until IeApp.ReadyState = READYSTATE_COMPLETE
    '
    IeApp.Document.forms(1)("txtPostCode").Value = "le1"
    IeApp.Document.forms(1).submit
    '
    Do
    Loop Until IeApp.ReadyState = READYSTATE_COMPLETE
    '
    ' NOW HOW DO I SEARCH THE NEWLY DISPLAYED WEBPAGE ?
    End Sub

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Response

    You might try an alternative strategy using Excel to write a RUBY script which is purpose built for driving web interfaces. I've done this sort of thing before to drive EBay from Excel.
    Martin

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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