I have website which has a textbox I would like populate and then a button I would like to click once the textbox is populated. I can get the code to click the button, but I can't seem to populate the textbox.
I can read the value of the textbox, but I am unable to write to it. I'm guessing this may be because the website requires data from the POST command? I know very little about using posting to fill in a website form data. Any help would be appreciated!
I'm afraid I can't post a link to the website as it would be pointless since it runs on a restricted access server.
Thanks!
BD
I can read the value of the textbox, but I am unable to write to it. I'm guessing this may be because the website requires data from the POST command? I know very little about using posting to fill in a website form data. Any help would be appreciated!
I'm afraid I can't post a link to the website as it would be pointless since it runs on a restricted access server.
Code:
Dim ieApp As Object, iePage As Object, READYSTATE_COMPLETE As Integer
READYSTATE_COMPLETE = 4
Set ieApp = CreateObject("InternetExplorer.Application")
ieApp.Visible = True
ieApp.Navigate "MyWebSite"
'wait for page to load
Do Until ieApp.ReadyState = READYSTATE_COMPLETE
Loop
Set iePage = ieApp.Document
strIn = "MyTextBoxData"
iePage.Forms("RAFTS_files").Item(0).Value = strIn 'Doesn't throw error, but doesn't populate either
MsgBox iePage.Forms("RAFTS_files").Item(0).Value 'Gives correct value if I pause macro and insert my own text manually
iePage.Forms("RAFTS_up").Item(".submit").Click 'This works
Set iePage = Nothing
Set ieApp = Nothing
Thanks!
BD