PDA

View Full Version : Need Help for WEB PAGE TextBox



akshay2007
06-29-2010, 12:37 AM
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.

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


--------

Thanks!

Akshay...

Kenneth Hobs
06-29-2010, 06:48 AM
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.

Shred Dude
07-07-2010, 09:19 AM
try something like this:
iedoc.getelementbyid("textboxname").value = "xyz123"