#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 190
Default form submit

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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 396
Default form submit

And the link with Excel is...?


--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"geebee" wrote:

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 190
Default form submit

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




"Wigi" wrote:

And the link with Excel is...?


--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"geebee" wrote:

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
JSP's form-submit & Excel's Web Query.... Kedar Agarkar Excel Programming 0 December 10th 07 12:33 PM
Excel VBA to click 'submit' on form Nixter Excel Programming 1 October 13th 05 12:20 AM
Form Input--Submit evangray123 Excel Programming 3 June 16th 05 11:34 PM
Form with submit button Hooter Excel Worksheet Functions 0 June 8th 05 07:12 PM
Submit User Form Contents to next available row jonathan Excel Programming 3 January 25th 04 07:17 PM


All times are GMT +1. The time now is 07:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"