Apr 20th, 2011, 12:02 PM
Automation Error - The Object invoked has disconnected from its clients
Below is a VB6 code snippet that worked flawlessly on Windows XP, but now throws this error on Windows 7...
Error Number: -2147417848
Error Description: Automation Error
The Object invoked has disconnected from its clients.
IE opens & navigates to the specified URL, albeit visible despite setting .Visible = False. While checking the .Busy status is where it errors. I assume it is due to Q319832, but I don't understand sufficiently to correct my code.
Dim ieApp As Object
Set ieApp = Nothing
Set ieApp = CreateObject("InternetExplorer.Application")
.Visible = False
While .Navigate(myUrl): Wend
While .Busy: Wend
Any help would be greatly appreciated!
Apr 22nd, 2011, 09:58 AM
Re: Automation Error - The Object invoked has disconnected from its clients
Hmm. The KB article is about early binding. You're doing late binding.
I would suggest creating the object in form_load or similar. Have it be a one-time event. Instead of destroying it and recreating it like you're doing.
You're probably destroying the [old] object while still referencing it(like in one of your many loops). With/End With will also cause its own persistent reference(while inside the block).
Last edited by FireXtol; Apr 22nd, 2011 at 10:04 AM.
Software I use and highly recommend: Opera, Miranda IM, Peerblock, Winamp, Unlocker Assistant, JoyToKey, Virtual CloneDrive, Secunia PSI, ExplorerXP, GOM Player, Real Alternative, Quicktime Alternative,Sumatra PDF, and non-freeware: Photoshop and VB6().
My codebank: AllRGB, Rounded Rectangle(math), Binary Server, Buddy Paint, LoadPictureGDI+, System GUID/Volume Serial, HexToAsc, List all processes and their paths, quasiString matching
Strings(search, extraction, retrieval etc): Retrieve BBCode Link from HTML, RemoveBetween ()'s, strFindBetween(str1,str2), Insert text in HTML, HTML - GetSpanByID
Click Here to Expand Forum to Full Width
Survey posted by VBForums.