Consulting

Results 1 to 3 of 3

Thread: Need Help for WEB PAGE TextBox

  1. #1

    Need Help for WEB PAGE TextBox

    Hi,

    I need help to identify and populate certain text in a textbox on a web page (in Int Expl).

    If possible can anyone help to get this query solved with a example of any sample webpage?

    I got the following information to get to IE, but not sure how to identify a text box on a webpage.

    [VBA]Sub IETextBox()
    Dim IeApp As InternetExplorer
    Dim sURL As String
    Dim IeDoc As Object
    Dim i As Long

    'Create new instance of IE
    Set IeApp = New InternetExplorer

    'Make it visible - some things don’t work
    'unless it’s visible
    IeApp.Visible = True

    'navigate to the page
    IeApp.Navigate "WEB URL HERE"

    'Pause the macro using a loop until the
    'page is fully loaded
    Do
    Loop Until IeApp.ReadyState = READYSTATE_COMPLETE

    'store the Document object
    Set IeDoc = IeApp.Document

    ' Need code line here for identifying a textbox on webpage and setting a value to it.

    IeApp.Quit
    'Clean up
    Set IeApp = Nothing

    End Sub
    [/VBA]

    --------

    Thanks!

    Akshay...

  2. #2
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    Why don't you try a webquery? Record it and then modify it as needed.

    If you still need help, post a sample url and what textbox info you need.

  3. #3
    try something like this:
    [VBA]iedoc.getelementbyid("textboxname").value = "xyz123"[/VBA]

Posting Permissions

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