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"
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"