Not Working VBA to log into Website

UPSDuder

New Member
Joined
Feb 14, 2019
Messages
10
I am attempting to log into a website in efforts to pull data. The Code I have pasted below, does not work for my application. If I am to change the website to gmail it will run without error.

This code will open the log in page, and then errors out at: "Loop Unti oBrowser.readyState = READYSTATE_COMPLETE"

Error: The object invoked has disconnected from its clients.

Is there a way to tell what is different about my website, and then modify my code to work?

Private Sub CommandButton1_Click()

Dim HTMLDoc As HTMLDocument
Dim oBrowser As InternetExplorer
Dim oHTML_Element As IHTMLElement
Set oBrowser = New InternetExplorer
oBrowser.Height = 1000
oBrowser.Width = 1000
oBrowser.Silent = True
oBrowser.navigate "https://igate.inside.ups.com/igateway/apps/index.cfm?action=PkgOps.Procedures.WilliamSonoma"
'oBrowser.navigate "https://gmail.com"
oBrowser.Visible = True
Do
Loop Until oBrowser.readyState = READYSTATE_COMPLETE
Set HTMLDoc = oBrowser.document
' waiting time of 6 seconds
Application.Wait DateAdd("s", 6, Now)
'Fill in passed user name and password
HTMLDoc.all.UserId.Value = "mcz0pjy"
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

wornhall

Board Regular
Joined
Feb 16, 2016
Messages
67
The site could not be reached. The result is:
[h=1]This site can’t be reached[/h][FONT=&quot]igate.inside.ups.com’s server IP address could not be found.[/FONT]
[FONT=&quot][/FONT][FONT=&quot]
  • Try running Windows Network Diagnostics.

DNS_PROBE_FINISHED_NXDOMAIN



[/FONT]
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,167,817
Messages
5,855,801
Members
431,765
Latest member
RedleoUK

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top