press button "entra" in web page

  • Thread starter Thread starter sal21
  • Start date Start date
S

sal21

... I have this macro but i dont know the command to press the butto
"entra" after i have inserted the personl detail....
Tks all...

Sub PROVA()

' Prepare to open the web page
Set ie = CreateObject("InternetExplorer.Application")

With ie
.Visible = True
.Navigate "http://liberomail.libero.it/"

' Loop until the page is fully loaded
Do Until Not .Busy
DoEvents
Loop

' Make the desired selections on the web page and click the submi
Button
' IE ie.document.all.Item LEGGE NELLA PAGINA html il tag d
riferimento
Set ipf = ie.document.all.Item("LOGIN")
ipf.Value = "123456"
Set ipf = ie.document.all.Item("PASSWD")
ipf.Value = "abcd"
Set ipf = ie.document.all.Item("CHOICE")
ipf.Value = "iol"
'???????????????????????
here the command to press the button "entra"
'???????????????????????
' Loop until the page is fully loaded
Do Until Not .Busy
DoEvents
Loop

End With

' Close the internet explorer application
ie.Quit

End Su
 
Try this:
ie.Document.Forms(0).submit()


The number 0 is the first form on the page if there are multiple form
you may need to adjust as needed
 
liquidhot said:
Try this:
ie.Document.Forms(0).submit()


The number 0 is the first form on the page if there are multiple form
you may need to adjust as needed.

Tks for fast reply but i have problem to integrate your command line
See the attached web page...
Tks

+-------------------------------------------------------------------
|Filename: submit.txt
|Download: http://www.excelforum.com/attachment.php?postid=3541
+-------------------------------------------------------------------
 
liquidhot said:
What's the problem? Does the line not work?

Sintiax error if i insert your line here:

' Make the desired selections on the web page and click the submit
Button
' IE ie.document.all.Item LEGGE NELLA PAGINA html il tag di
riferimento
Set ipf = ie.Document.all.Item("LOGIN")
ipf.Value = "123456"
Set ipf = ie.Document.all.Item("PASSWD")
ipf.Value = "abcd"
Set ipf = ie.Document.all.Item("CHOICE")
ipf.Value = "iol"

'???????????????????????
ie.Document.Forms(0).submit()
'???????????????????????

' Loop until the page is fully loaded
Do Until Not .Busy
DoEvents
Loop
 
Can you give me the syntax error? (I'm not an expert by any means, bu
I'm good at troubleshooting! :)
 
liquidhot said:
Can you give me the syntax error? (I'm not an expert by any means, but
I'm good at troubleshooting! :) )

... i have the sintiax error on your line but vba not tell me other;-(

The line is in red when i insert: ie.Document.Forms(0).submit()
into the code.
 
Back
Top