Hi,
The below macro should open an invisible Internet Explorer window and then close it. I have 4 computers but the macro only runs on 2 of them.
On the computers where the macro doesn't work, a visible Internet Explorer window is opened (even though I've written .Visible = False) and I get an error message at the "Do Until.. " line. The error message reads:
"Automation Error The object invoked has disconnected from its clients"
Do anyone know what can be the problem? All of my computers run Excel 2007, Internet Explorer 8 and Windows Vista Business SP2.
The below macro should open an invisible Internet Explorer window and then close it. I have 4 computers but the macro only runs on 2 of them.
Code:
Sub Test()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Visible = False
.Navigate "[URL]http://www.wmcompany.com/wmr/CurrencyConverter/index.htm[/URL]"
Do Until .ReadyState = 4: DoEvents: Loop
.Quit
End With
Debug.Print "Finito"
End Sub
On the computers where the macro doesn't work, a visible Internet Explorer window is opened (even though I've written .Visible = False) and I get an error message at the "Do Until.. " line. The error message reads:
"Automation Error The object invoked has disconnected from its clients"
Do anyone know what can be the problem? All of my computers run Excel 2007, Internet Explorer 8 and Windows Vista Business SP2.