+ Reply to Thread
Results 1 to 8 of 8

Excel VBA Error: Automation error - the object invoked has disconnected from its clie

  1. #1
    Registered User
    Join Date
    01-14-2010
    Location
    Chevy Chase, Maryland
    MS-Off Ver
    Excel 2007
    Posts
    2

    Excel VBA Error: Automation error - the object invoked has disconnected from its clie

    I have a rather complicated insurance rating application for D&O, EPL and fiduciary rating - there's a main user form that shields users from the underlying Excel worksheets - there are numerous worksheets storing tables of data and that contain numerous excel functions. In between the worksheets and the UI is about 8,000 lines of VBA code.

    The application runs fine on my laptop, but when I release it for users to test, the application blows up immediately with the error message indicated in the title.

    I've checked versioning of software, service pack installed, add-ins, options, settings, etc. and cannot determine why/how my laptop is setup differently from users. I have also tried running this application on another developers laptop - same problem as with users.

    On my computer I have discovered that under Options, Add-ins, several are listed under the "Disabled application Add-ins" heading instead of under "Disabled Application Add-ins". Thes einclude "Analysis Toolpack", Analysis Toolpack - VBA", "Conditional Sum Wizard", Internet Assistant VBA", Lookup Wizard" and "Solver Add-in". Could this be what's causing the behavioral difference?

    I'd be very grateful for any help anyone could provide.

    Thanks

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Excel VBA Error: Automation error - the object invoked has disconnected from its

    Hi,

    I'd hazard a reasonable guess that this is a network problem rather than an Excel problem. When you issue it to users are they opening the file from their email client perchance?

    Try asking them to save it locally and use from their laptops in much the same way that you do. Do they get the same problems?

    Rgds
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: Excel VBA Error: Automation error - the object invoked has disconnected from its

    hi BissonK,

    Welcome to the Forum

    I tend to agree with Richard, however...
    A longshot with your code*, is that the error could potentially relate to range or object references that are not completely "explicitly referenced" (right to the application level).
    * (8000 lines - wow, I'm not volunteering to go through it! )

    Goodluck
    hth
    Rob
    Rob Brockett
    Kiwi in the UK
    Always learning & the best way to learn is to experience...

  4. #4
    Registered User
    Join Date
    01-14-2010
    Location
    Chevy Chase, Maryland
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Excel VBA Error: Automation error - the object invoked has disconnected from its

    Thanks for the response.

    There are thousands of references to moving data into, out of or between ranges across multiple worksheets and UI objects. When I've made statement sytnax errors, I'd get compile errors that highlighted the offending statement. What do you mean by an "not completely explicitly referenced"? Would an statement example be something like:

    txtName = "George"

    opposed to

    txtName.Value = "George"

    Does the above example illustrate the concept?

    I too, am now getting the error. When I shut down my computer for the day and booted up later at home, I started getting the error.

    I'm pretty certain the error is occurring on the form load event, which fires when the workbook is opened. I can't get past it. Is there a way to open the workbook up in a mode that bypasses the firing of the workbook open code? I earlier versions of MS Office I'd open the app while pressing the shift key, I think (it's been a while since I've needed to do that).

    Thanks for your help.

  5. #5
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264

    Re: Excel VBA Error: Automation error - the object invoked has disconnected from its

    You may find the following useful - it isn't directly applicable but does sound mighty similar to what you are seeing:

    http://support.microsoft.com/default...;en-us;Q319832
    Richard Schollar
    Microsoft MVP - Excel

  6. #6
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Excel VBA Error: Automation error - the object invoked has disconnected from its

    Are you loading the form directly in the Workbook_Open event?
    (holding down the shift key, or disabling macros, should get you into the workbook.)
    Remember what the dormouse said
    Feed your head

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Excel VBA Error: Automation error - the object invoked has disconnected from its

    Just to suggest the obvious, after you open the workbook with macros disabled:

    Is Option Explicit at the top of every module?

    Are all the modules comfortably less than 64K?

    Have you tried running AppsPro CodeCleaner?
    Entia non sunt multiplicanda sine necessitate

  8. #8
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: Excel VBA Error: Automation error - the object invoked has disconnected from its

    hi Bissonk,

    Here's a link to the another thread where the OP had a similar issue & I had a go at explaining explicit references. However, you'll probably find it easier to understand the MS explanation (see Richard's link).
    http://www.excelforum.com/excel-prog...ed-client.html

    re ".value"
    This is the default property of range references & is probably safe to omit - the only time it could break is if MS get busy with the next version of Excel & change the default property. However, I play better safe than sorry so I state ".value" in my code.

    hth
    Rob
    Last edited by broro183; 01-15-2010 at 02:36 PM. Reason: added link

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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