+ Reply to Thread
Results 1 to 10 of 10

Automation Error: Catastrophic failure

  1. #1
    Registered User
    Join Date
    09-20-2016
    Location
    New York
    MS-Off Ver
    10
    Posts
    3

    Automation Error: Catastrophic failure

    Hello everyone, I'm new to VBA and I'm getting an error that I can't find any good information on. The error happens whenever I open a workbook that I made. It says Automation Error: Catastrophic failure. When I press OK it brings me to the debugger and highlights the first line of a function I wrote. I can usually fix it by pressing reset, but sometimes that doesn't work and I need to reset the project by just putting in a line of code and then deleting it. Has anyone else had this issue before? If so, how do you stop it from happening?

  2. #2
    Forum Contributor
    Join Date
    10-30-2014
    Location
    England
    MS-Off Ver
    2007 / 365
    Posts
    279

    Re: Automation Error: Catastrophic failure

    I think you'll need to at least post some example code and explain what your macro is doing in order to get a diagnosis.

  3. #3
    Registered User
    Join Date
    09-20-2016
    Location
    New York
    MS-Off Ver
    10
    Posts
    3

    Re: Automation Error: Catastrophic failure

    Oh sorry, I've never done this before. Here is my code.

    Please Login or Register  to view this content.
    I have multiple running totals over a number of different sheets and I use this function to return the value of a cell in a previous sheet. It works fine most of the time but this error pops up every so often and I have no idea why.
    Last edited by davesexcel; 05-01-2022 at 04:45 AM.

  4. #4
    Forum Contributor
    Join Date
    10-30-2014
    Location
    England
    MS-Off Ver
    2007 / 365
    Posts
    279

    Re: Automation Error: Catastrophic failure

    I'm very far from a VBA expert, but would offset and Ref not need to be specifically dimmed?

    Also, is this not something you could do simply with a formula?
    Last edited by EchoPassenger; 09-20-2016 at 02:27 PM.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Automation Error: Catastrophic failure

    Any chance you could upload a sample workbook?

    Click on GO ADVANCED, scroll down and click Manage Attachments.
    If posting code please use code tags, see here.

  6. #6
    Registered User
    Join Date
    09-20-2016
    Location
    New York
    MS-Off Ver
    10
    Posts
    3

    Re: Automation Error: Catastrophic failure

    I don't think I can upload the workbook as it contains confidential client information, but I can show a screenshot of the error. Would that help?

  7. #7
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Automation Error: Catastrophic failure

    Offset and Ref are reserved words. Use other argument names to start with.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  8. #8
    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: Automation Error: Catastrophic failure

    Offset and Ref are not reserved words in VBA.

    How are you using the function?
    Entia non sunt multiplicanda sine necessitate

  9. #9
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Automation Error: Catastrophic failure

    Could you attach a sample workbook, with no confidential data, that demonstrates the problem?

  10. #10
    Forum Contributor
    Join Date
    08-14-2013
    Location
    Florida
    MS-Off Ver
    Excel 2013
    Posts
    105

    Re: Automation Error: Catastrophic failure

    I have had issues like this (if fact not even a week ago). Every time that I have had this issue it had to do with referencing something that was no longer there. THIS IS AN EXAMPLE: Like a public worksheet variable when I have set the workbook = nothing. It happens that the worksheet variable shows no properties but is also not nothing. Thus checking if the worksheet is nothing doesn't work and then you get an automation error.

    Things that I have noticed. The program works fine, but if running it several times I would get an automation error (unless I have properly ending the program with "End" or setting all public variables to nothing). Closing Excel and trying again, and all would be good. It seems random but it is not.

    My 2cents in avoiding automation errors (well one specific to this example):

    If using .Parent (make sure that goes somewhere) and write procedures that take arguments over having public variables whenever feasible.

    V/R,

    Rich

+ 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. System Error &H8000FFFF (-2147418113). Catastrophic failure
    By questionguy in forum Excel General
    Replies: 1
    Last Post: 08-27-2012, 06:14 PM
  2. Path/file error and catastrophic failure after inactivitiy
    By nomorefun in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-25-2012, 11:40 AM
  3. Userform.show = Catastrophic Failure
    By mark.mba in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-15-2009, 08:48 AM
  4. [SOLVED] catastrophic failure
    By Harikarishna in forum Excel General
    Replies: 0
    Last Post: 07-07-2006, 06:55 AM
  5. [SOLVED] Catastrophic Error in XL 2003
    By Micah in forum Excel General
    Replies: 2
    Last Post: 06-12-2006, 03:00 PM
  6. System Error &H8000FFFF (-2147418113). Catastrophic Failure
    By poppy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-30-2005, 08:40 AM
  7. Failure to open workbook via automation
    By VanS in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-04-2005, 06:07 PM
  8. Connection to MySQL causes "Catastrophic failure"
    By Flemse in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-11-2005, 09:06 AM

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