+ Reply to Thread
Results 1 to 8 of 8

Automation error - object invoked has disconnected from its clients

  1. #1
    Registered User
    Join Date
    11-19-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    2016
    Posts
    57

    Automation error - object invoked has disconnected from its clients

    Hello Excel Forum,

    Any idea why does the below code work for some URLs, but doesn't for others?
    Please Login or Register  to view this content.
    I am able to open any webpage, but for some, i'm getting an error the moment i try to print the 'readystate' property:

    Capture.PNG

    Does anyone know why this is happenening and how to prevent this?

    Thanks,

  2. #2
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Automation error - object invoked has disconnected from its clients

    Does inserting a DoEvents command before the Debug.Print command help?
    Cheers!
    Tsjallie




    --------
    If your problem is solved, pls mark the thread SOLVED (see Thread Tools in the menu above). Thank you!

    If you think design is an expensive waste of time, try doing without ...

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Automation error - object invoked has disconnected from its clients

    Since you are using early binding ( New), you have to tick IE as a reference on the tools.

    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Automation error - object invoked has disconnected from its clients

    OR
    Late binding

    Please Login or Register  to view this content.

  5. #5
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Automation error - object invoked has disconnected from its clients

    Not quite sure, but wouldn't one DoEvents be enough?
    Also if the ReadyState would for some reason never get to be 4, the procedure would end up in an endless loop.
    So you would need something to bail out of it. Some counter or time-out.

  6. #6
    Registered User
    Join Date
    11-19-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    2016
    Posts
    57

    Re: Automation error - object invoked has disconnected from its clients

    Thank you, so I tried all of the above suggestions, but nothing worked

    'Microsoft Internet Controls' is selected in my references, i think this is what you mean, right? Or should there actually be an 'IE' or 'Internet Explorer' reference?

    What puzzles me is that i am able to navigate to any website with this code, but only for some the connection to the ie object get's 'dropped'.

    I have tried this now on three machines with the same result.

    Also, though not sure how relevant this is, the error messages i'm getting vary between these three:
    Capture1.PNG Capture2.PNG Capture3.PNG

  7. #7
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Automation error - object invoked has disconnected from its clients

    The most likely reason could be your version of IE. I did not get an error. Please attach an excel sample, not a picture.

    This works for me


    Please Login or Register  to view this content.
    Last edited by AB33; 10-28-2016 at 05:16 PM.

  8. #8
    Registered User
    Join Date
    11-19-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    2016
    Posts
    57

    Re: Automation error - object invoked has disconnected from its clients

    Yup, that works for me too for this URL, but my initial code also workes for this URL.

    OK, I actually found a solution!!!

    I realized that i'm getting these errors only for some internal corporate sites (intranet).

    So i searched online and found a solution here http://stackoverflow.com/questions/1...local-intranet

    Thank you @AB33 and @Tsjallie for taking time to look into my problem.

    Best regards,

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. -2147417848 automation error the object invoked has disconnected from its clients
    By aishwaryadn in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-22-2015, 04:13 PM
  2. [SOLVED] Automation Error -2147417848 The object invoked has disconnected from its clients
    By soranz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-17-2015, 04:43 AM
  3. Automation error , the object invoked has disconnected from its clients
    By lini1985 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-21-2014, 08:55 AM
  4. [SOLVED] Automation error Object invoked has disconnected from its clients
    By BobMillar in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-13-2014, 06:59 AM
  5. 2147417848 automation error the object invoked has disconnected from its clients
    By KasiaFavourite in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-12-2011, 10:44 AM
  6. -2147417848 automation error the object invoked has disconnected from its clients
    By ajaykgarg in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 11-12-2011, 08:10 AM
  7. Replies: 3
    Last Post: 06-17-2005, 09:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1