• 0

Trouble with Excel Macro Auto Login


Question

I have been trying to use a Macro in VBA/Microsoft Excel to auto login to a web site automatically and fill in information into the web page.  On the up side I'm able to do this on several different web sites (google, hotmail, etc); however, when I attempt to log in to a couple in particular web sites I receive an error.  The message reads:

 

"System Error &H80010108 (-2147417848). The object invoked has disconnected from its client."

 

 

Again, I know the code is close to correct because this works on several web pages, but a couple others time out.  After several days of researching I'm still not any closer to a solution.  When running the code line-by-line, it appears as though VBA/Excel is loosing the webpage.  I'm not sure if it's because the web site is encrypted or something else may be going on.

 

I've attached the code below and commented where the problem is.  Do you have any thoughts why I may be having issues with this web site?  Any thoughts would be greatly appreciated!!!

 

-Thanks

 

 

 

*****VBA SCRIPT*****

_______________________________

Sub WebPageStartup()

 

Dim IE As Object

 

Set IE = CreateObject("InternetExplorer.Application")

IE.Visible = True

 

IE.navigate "https://enterpriseportal.disney.com"

 

Do                         '-Begins the problem when waiting for ready state to be complete

DoEvents

Loop Until IE.readyState = 4

 

HTMLDoc.all.USER.Value = "abc"

HTMLDoc.all.PASSWORD.Value = "123"

IE.document.getElementById("Enter").Click

 

End Sub

_______________________________

Link to comment
https://www.neowin.net/forum/topic/1334184-trouble-with-excel-macro-auto-login/
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

This topic is now closed to further replies.