Hi - I have a macro that is supposed to open a page on a web site, select and copy the entire contents of that page, then paste into a new workbook. It works properly the first or second time I run Excel after a system restart. After that I receive an error stating: Run-Time Error '-2147417848 (80010108)': Automation error. The object invoked has disconnected from its clients. I uploaded and attached a screen shot of this error window. Once it occurs the first time, I get this error every other time on the connection .REFRESH command until I close down and restart my system. I'm wracking my brain trying to figure out why it works one or two times then stops. I've tried clearing IE cache and changing the IE page view setting to refresh the page on every visit thinking therre may be a link between how IE works the web and how my VBA code is interacting with the web, to no avail. I've searched Microsoft knowledgebase for this error and see references to it, but nothing seems related to getting this error when using the statement With Worksheets(1).QueryTables.Add(Connection:=... Does anyone have a clue what might be happening, or what else I can try to get around this problem? Thanks.




Reply With Quote