form submit

G

geebee

hi,

i have some code that opens up a web page and fills in the user and password
fields. then i have some code to submit the form. there is an OK and a
CANCEL button in the internet ASP form. here is my code:

....
With myDoc.getElementsByName("user")(0)
..Value = strUSERNAME
End With

myDoc.forms(0).submit

i noticed that the web page is refreshed and almost looks like it is going
to go to another page, but in the end it is just refresh, with the username
and password cleared out. what am i doing wrong? i simply need to simulate
clicking the OK button.

thanks in advance,
geebee
 
G

geebee

hi,

here is some more code:

Dim myIE As New InternetExplorer 'New '
Dim myURL As String
Dim myDoc As HTMLDocument
Dim strSearch As String

'Set starting URL and search string
myURL = "https://securesitenotprovided...asp"

'Make IE navigate to the URL and make browser visible
myIE.navigate myURL
myIE.Visible = True

'Wait for the page to load
Do While myIE.Busy Or myIE.readyState <> READYSTATE_COMPLETE
DoEvents
Loop

'Set IE document into object
Set myDoc = myIE.document

hopefully this will allow you to help me out...

thanks in advance,
geebee
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top