Method 'Busy' of Object 'IWebBrowser 2' failed Error From Access

jlyn123

New Member
Joined
Jan 24, 2018
Messages
48
Office Version
  1. 2016
I am at a loss...I cant find anything online to help figure out why I am getting this error message. I have used this VBA code before (located below) and now when I try to use I keep getting this error and cant move forward. The website opens and I can sign in but the coding is supposed to processing items when I log in but I cant get past this spot.

Any help would be greatly appreciated.

Public Function FnWaitForPageLoad(objIEBrowser)
Do While (objIEBrowser.Busy Or objIEBrowser.READYSTATE <> 4)
DoEvents
Loop

End Function

Thanks!
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Hello, I am still not getting anywhere with this code. If I use what is provided in the above thread I still get the same error message. What is strange is I am using the same coding in a different database for a production website and everything works fine. This is a website for a testing website - would that make a difference? Only difference is the url? It will reach the login page but once it gets to the code to look for next page it disconnects? Do you know why there would be a disconnection?

Thanks!
 
Upvote 0
What is the declaration of objIEBrowser?
 
Upvote 0
objIEBrowser is set to the below

Set objIEBrowser = GetObject("new:{D5E8041D-920F-45e9-B8FB-B1DEB82C6E5E}")
objIEBrowser.Visible = True
objIEBrowser.Navigate ("https://odmuat.acsgs.com/MarshUAT/Login.aspx")

This same code works fine with a slightly different HTTP address for the production website. Not sure what it is getting caught up on this one.

Thanks!
 
Upvote 0
You say you can't get past the login page - do the login details you are using work on both the UAT and the production site?
 
Upvote 0
Yes, they both have different logins but it works manually and with coding through production but not with coding through UAT.
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,269
Members
452,628
Latest member
dd2

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
Back
Top