So...
I searched through the forum, and really found a lot of threads with awesome suggestions, but none of them works (Example
Thing is my code randomly breaks on Set ie = CreateObject("InternetExplorer.Application"). After resuming code it is always continuing without a problem. Error msg is: Run-time error '-2147467259 (80004005)' Automation error Unspecified error
After each iteration I do ie.quit and set ie = nothing and additionally I checked and clear processes, just in case if internetexplorer would pile up and suffocate my computer in the background.
Something like:
If CheckIFRunning("INTERNET EXPLORER.EXE") = True Or CheckIFRunning("IEXPLORE.EXE") = True Then oProc.Terminate
And like many suggested I tried Set ie = New InternetExplorerMedium but with no luck.
I added application.wait as I thought maybe there is a split second where IE is still not close and I'm already starting a new instance but that didn't help as well.
I can add a code, but it is extremely long and my only problem is on CreateObject.
I would like to at least resume execution even if for some reason really there is a problem with creating object (and yes, I've tried on error resume next).
Try this, hope it will help you .
replace
with