Thread: little help
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
ron ron is offline
external usenet poster
 
Posts: 118
Default little help

On Jan 26, 9:27*am, bluburter wrote:
Hi all,
I modified posted code so I can put login and pass into
www site but I have no idea how to click submit button....
If anyone could help I'll be grateful :)

Public Sub test()
* * Set ie = CreateObject("InternetExplorer.Application")
* * With ie
* * * * .Visible = True
* * * * .Navigate "http://www.yg1.co.kr/europe/"
* * * * *Do Until Not .Busy
* * * * * * *DoEvents
* * * * *Loop
* * * * Set ipf = ie.Document.All.Item("id")
* * * * * * ipf.Value = "xxx"
* * * * Set ipf = ie.Document.All.Item("pwd")
* * * * * * ipf.Value = "xxx"
* * * * Set ipf = ie.document.all.Item("submit") * '????
* * * * * * ipf.Value = "submit" * * * * * * * * * * * * * '????
* * * * * * ipf.Click
' Loop until the page is fully loaded
* * * * Do Until Not .Busy
* * * * * * DoEvents
* * * * Loop
* * End With
* *' ie.ExecWB OLECMDID_SELECTALL, OLECMDEXECOPT_DONTPROMPTUSER
* *' ie.ExecWB OLECMDID_COPY, OLECMDEXECOPT_DODEFAULT
* * ie.ExecWB 12, 2
* * ie.ExecWB 12, 0
* *' ie.Quit

End Sub


The "submit" button is an image and it is the only image on the page.
Instead of
Set ipf = ie.document.all.Item("submit") '????
ipf.Value = "submit" '????
ipf.Click

try
ie.document.images(0).Click

....Ron