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"
 

Some videos you may like

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

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]
 

Watch MrExcel Video

Forum statistics

Threads
1,123,088
Messages
5,599,664
Members
414,325
Latest member
kfg1287

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