• Sign in to Neowin Faster!

    Create an account on Neowin to contribute and support the site.

  • 0
Sign in to follow this  

Trouble with Excel Macro Auto Login

Question

techmikeprog    0

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

_______________________________

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.