Link to home
Start Free TrialLog in
Avatar of intoxicated_curveball
intoxicated_curveball

asked on

Automation error using CreateObject("InternetExplorer.Application")

I'm using the following code in VBA:

    Dim IE As Object
    Set IE = CreateObject("InternetExplorer.Application")

I've also tried:

    Dim IE As Object
    Set IE = New InternetExplorerMedium

I always finish with:

    IE.Quit
    Set IE = Nothing

But I randomly get an "Automation Error" (usually is fine except for about 1 quarter of the time):

Run-time error '-2147023706 (8000704a6)':

Automation error
A system shutdown has already been scheduled.


Seems like IE is not closing properly sometimes.
ASKER CERTIFIED SOLUTION
Avatar of chaau
chaau
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
silly question, but have you rebooted since getting the error?
Avatar of intoxicated_curveball
intoxicated_curveball

ASKER

Rebooting or waiting a few minutes seems to always work. But I'm using this frequently so that's only a temp solution. Seems to have something to do with the object or process still running enough though it shouldn't be?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.