press button "entra" in web page

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
 
L

liquidhot

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
 
S

sal21

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
+-------------------------------------------------------------------
 
S

sal21

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
 
L

liquidhot

Can you give me the syntax error? (I'm not an expert by any means, bu
I'm good at troubleshooting! :)
 
S

sal21

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.
 
L

liquidhot

try

Set ipf = ie.Document.Forms(0).submit()

I don't know if that will work or not
 

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