+ Reply to Thread
Results 1 to 6 of 6

Visual Basic for Applications - Automation error

Hybrid View

  1. #1
    Registered User
    Join Date
    05-07-2015
    Location
    Guildford, England
    MS-Off Ver
    O365
    Posts
    4

    Visual Basic for Applications - Automation error

    I have a spreadsheet with VB code. The code works OK when the spreadsheet is open. However if I save and close the spreadsheet, then re-open it I get a pop-up saying just 'Automation Error' plus OK and help buttons.
    automation error.JPG
    Clicking on OK opens the VB editor window, the spreeadsheet is locked and the visual basic is stopped. In the VB editor project pane, the Solver addin is showing, plus my personal.xlsb, and a third project which has no label or name. Looking into that project, it has the modules with my code, the forms, but the Excel objects (sheets) are highlighted blue and are just labels sheet1, sheet 10 etc rather than the actuall sheet names
    automation error2.JPG
    Trying to start any of the macros, results in the 'automation error' pop-up appearing again. It is not possible to close Excel as the window is completely unselectable. Trying to close the VB editor results in a message 'the command will stop the debugger'. clicking OK, takes you to auto re-start of Excel - the same cycle again.

    The only way out is to use the Task manager to stop Excel.

    Now the interesting bit - if I rename my worksheet, I can then open it, and it works. However, saving the new version after using it, and then trying to open again - same problem.

    any ideas?

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,323

    Re: Visual Basic for Applications - Automation error

    Welcome to the forum!

    Will you please attach the Excel workbook?

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    05-07-2015
    Location
    Guildford, England
    MS-Off Ver
    O365
    Posts
    4

    Re: Visual Basic for Applications - Automation error

    Sorry, I can't share the spreadsheet as it is at the moment, as it's got sensitive information in it. I could take the info out and try to create some dummy data, but I fear that the spreadsheet is too big and too badly organised for anyone else to quickly look at. I was hoping that others might have experienced similar, or have any general ideas on likely causes which I could then try to see whether impact the spreadsheet.

  4. #4
    Registered User
    Join Date
    05-07-2015
    Location
    Guildford, England
    MS-Off Ver
    O365
    Posts
    4

    Re: Visual Basic for Applications - Automation error

    I should add that if you open a copy of the spreadsheet which has a new name, (which works) and then close it, even without saving, the automation error occurs when you try to open it a second time, even if the computer is restarted before the second attempt at opening

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

    Re: Visual Basic for Applications - Automation error

    It might be the solver Adds-in is performing auto calculation and might led to error. Disable the solver code from the add-in and see if this makes a difference.

  6. #6
    Registered User
    Join Date
    05-07-2015
    Location
    Guildford, England
    MS-Off Ver
    O365
    Posts
    4

    Re: Visual Basic for Applications - Automation error

    Removing 'Solver' unfortunately does not solve the problem, sorry.

+ 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. Replies: 6
    Last Post: 08-18-2010, 03:22 PM
  2. VB for Applications to Visual Basic
    By carsto in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-01-2009, 03:31 PM
  3. Microsoft Visual Basic For Applications Extensibility Library
    By DCSwearingen in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-26-2006, 03:52 PM
  4. RE: Where do I find help for Visual Basic for Applications Extensibili
    By K Dales in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-19-2005, 01:05 PM
  5. Re: Where do I find help for Visual Basic for Applications Extensibili
    By Jim Rech in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-19-2005, 01:05 PM
  6. Linking to Visual Basic for Applications Help Files
    By Glynn in forum Excel General
    Replies: 0
    Last Post: 10-07-2005, 09:05 PM
  7. [SOLVED] Visual Basic for Applications Help not working right.
    By Jack Gillis in forum Excel General
    Replies: 13
    Last Post: 08-17-2005, 09:05 PM
  8. Visual Basic for Applications Not Working Right -- Follow Up
    By Jack Gillis in forum Excel General
    Replies: 2
    Last Post: 06-06-2005, 05:05 PM

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