Hello there -
I am having difficulties with handling IE errors to prevent manual intervention when a webpage throws an error.
My code to engage IE is:
'ASSIGN ARRAY POSITION USING IE(Counter)
Set IE(CounterMax) = GetObject("new:{D5E8041D-920F-45e9-B8FB-B1DEB82C6E5E}")
Application.Wait 2
With IE(CounterMax)
.Visible = True
.Navigate BookLink
End With
My VBA routine cycles through a list of URL links, loads the pages, and transfers information across. The pages are loaded in groups of 10, and the cycle repeats itself until it has worked through all links in the list.
The issue is occasionally I get an IE error "The webpage has stopped responding, or something along those lines" and it requires the user to click "Close" on the error prompt before the VBA code will continue. Another error that occasionally occurs is: Microsoft Excel is waiting on another OLE action" and that as well requires the user to click "ok" in order for the process to continue.
I am hoping to find a setting in VBA that will suppress those messages so as to allow the code to continue without trying to deal with this via a timer & send keys.
I have tried things like:
Application.IgnoreRemoteRequests = False
Application.DisplayAlerts = False
Is there something else I am not thinking of that might prevent IE from displaying those prompts and hanging the process up until the user clicks on the dialog box?
I am having difficulties with handling IE errors to prevent manual intervention when a webpage throws an error.
My code to engage IE is:
'ASSIGN ARRAY POSITION USING IE(Counter)
Set IE(CounterMax) = GetObject("new:{D5E8041D-920F-45e9-B8FB-B1DEB82C6E5E}")
Application.Wait 2
With IE(CounterMax)
.Visible = True
.Navigate BookLink
End With
My VBA routine cycles through a list of URL links, loads the pages, and transfers information across. The pages are loaded in groups of 10, and the cycle repeats itself until it has worked through all links in the list.
The issue is occasionally I get an IE error "The webpage has stopped responding, or something along those lines" and it requires the user to click "Close" on the error prompt before the VBA code will continue. Another error that occasionally occurs is: Microsoft Excel is waiting on another OLE action" and that as well requires the user to click "ok" in order for the process to continue.
I am hoping to find a setting in VBA that will suppress those messages so as to allow the code to continue without trying to deal with this via a timer & send keys.
I have tried things like:
Application.IgnoreRemoteRequests = False
Application.DisplayAlerts = False
Is there something else I am not thinking of that might prevent IE from displaying those prompts and hanging the process up until the user clicks on the dialog box?