Lets assume you have the code below(pulls website up, enters username and password, and submits)
After the click is made how can we automatically run a macro? I've tried
But that doesn't seem to work.
Code:
Function FillInternetForm()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
'create new instance of IE. use reference to return current open IE if
'you want to use open IE window. Easiest way I know of is via title bar.
IE.Navigate "[URL]https://login.yahoo.com/config/login?.intl=us&.lang=en-US&.partner=&.last=&.src=fpctx&.pd=fpctx_ver%3D0%26c%3D%26ivt%3D%26sg%3D&pkg=&stepid=&.done=http%3a//www.yahoo.com/[/URL]"
'go to web page listed inside quotes
IE.Visible = True
While IE.busy
DoEvents 'wait until IE is done loading page.
Wend
IE.document.All("username").Value = "Myusername"
IE.document.All("passwd").Value = "12345"
IE.document.All(".save").Click '<`the click in question
End Function
After the click is made how can we automatically run a macro? I've tried
Code:
If IE.document.All(".save").Click = True Then.....