I have been trying to load a website and then click a button once it has loaded. Each time .Navigate is completed and its time for it to click the button, I get the error message:
The object invoked has disconnected from its clients."
I have tried this several different ways but can't seem to get it to do anything besides navigate to the website before the error comes
Here is the code that I used last:
Sub Test() 'Loging into Par website to pull ACE metrics' Dim oIE As InternetExplorer 'Create IE Object' Set oIE = New InternetExplorer 'Go to website' oIE.Navigate " [URL="http://www.website"]www.website[/URL].com" 'Wait til ready' Do While oIE.Busy = True Loop 'Click login - Error produce on this line of code' oIE.Document.getElementsByName("btnLogin").Click End Sub
HTML code of button
Any help would be be greatly appreciated