Results 1 to 4 of 4

object invoked has disconnected from its clients

This is a discussion on object invoked has disconnected from its clients within the Excel Questions forums, part of the Question Forums category; Someone just called - their Excel macro is performing very strangely. When they try to delete a row in the ...

  1. #1
    . MrExcel's Avatar
    Join Date
    Feb 2002
    Location
    Akron, Ohio USA
    Posts
    828

    Default

    Someone just called - their Excel macro is performing very strangely. When they try to delete a row in the worksheet, the row actually deletes, but they get this message:

    Automation error
    The object invoked has disconnected from its clients.

    Upon pressing debug, this row is highlighted:
    Sheets(SN(OPS)).Rows(r).Delete Shift:=xlUp

    Again the strange thing is that the row *does* actually get deleted.

    Any ideas on this message?
    View a collection of recent Excel articles in the Excel Daily News

  2. #2
    Board Regular
    Join Date
    Aug 2009
    Posts
    90

    Default Re: object invoked has disconnected from its clients

    I realize this thread is very, very old, but I just ran into this problem and wanted to contribute.

    Following one of the links provided in the previous post, I followed the Microsoft advice about adding "Option Explicit" to my VBA code and the problem seems to have gone away for good. In my case, the error was occurring when trying to add a text box to a pivot chart in Excel 2007 via macro.

    It's too early to tell for certain, but this also seems to have had the side benefit of solving a really weird problem I was having in which chart tabs were renaming themselves from the descriptive names I was giving them to the default names of Chart1, Chart2, etc. I never did find a solution to this other problem via Google searching.

  3. #3
    Board Regular
    Join Date
    Jan 2010
    Posts
    66

    Default Re: object invoked has disconnected from its clients

    Option Explicit will help, some of the time. I've added it to my workbook and I get the error less, but it still happens.

    In my case, Excel 2007 always crashes when I hit debug, so I never know what line of code is causing the problem.

  4. #4
    New Member
    Join Date
    Oct 2010
    Location
    Buenos Aires, Argentina
    Posts
    1

    Default Re: object invoked has disconnected from its clients

    Thank you! I tried the Option Explicit in my Microsoft Word 2000 and it worked!

    I had actually debugged the problem to find that the bug was down to a API Declaration I had made (SetTimer of the user32 library). The message object invoked must have gotten confused when looking for a variable as I added more code elsewhere. Most interesting!

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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


DMCA.com