I am running an Excel VBA macro that opens an instance of IE, retrieves data from a URL, and then has to close the instance again.
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
Set IE = GetObject("new:{D5E8041D-920F-45e9-B8FB-B1DEB82C6E5E}")
' Do stuff...
' Clean up
IE.Quit
Set IE = Nothing
I looked at this method and should close the IE instance. However, this does not work for me. Task Manager confirms that the process iexplorer.exeis still running. If I run the macro several times, a new instance is added and never closed.
How to force a macro to close an instance correctly?
I am using IE 8.0 and VBA 7.0 on this.
source
share