• Automation Error (2000 SR1)

    Author
    Topic
    #358332

    I have locked myself out of my house.

    In my workbook, ever gently changing over the last 6 months, I have Application.EnableCancelKey = False set on the Workbook_Open Event (despite the admonition of the help file). The workbook displays a userform requesting a code to proceed further. Application is hidden at this point. Upon entering the correct code, an Automation Error is generated.

    30 minutes ago, I added a gif containing the company logo to the startup form (the same form which requests the user code). I believe that something with the gif or the location has caused the Automation Error.

    I have tried all possible combinations of Esc, Crtl, Shift, Enter, Break, End, Insert, and Delete in an effort to stop the code at some point so I can get into the VBA project to correct (or at least see) where the problem is.

    I have opened the Workbook in question, and then opened another instance of Excel in an effort to see the VBA project of the faulty workbook through the VB editor. Does not work…the project with the automation error is not visible.

    Any ideas? Or some other way to break in to my project? hairout grovel bash

    Any thoughts about writing an add-in to unlock the troubled VBA project? lightbulb joy

    Viewing 1 reply thread
    Author
    Replies
    • #534398

      Michael,

      If, whilst opening your troubled project you keep the Shift key depressed, it will open but not run any macros as it opens. You might then be in a psoition to debug your code (if it needs debugging that is).

      Hope that can assist.

      Andrew.

      • #534430

        Thanks Andrew,

        I did finally get into it this morning by opening one instance of Excel, opening the troubled workbook from the most recently used files list and holding shift/end down together. Still no luck on finding what caused it. Evidently it had nothing to do with the gif because I removed that, and removed all of the files in the windows/temp directory and still happens.

    • #534534

      For what it’s worth, and if anyone else might have this problem here is what I found:

      1. Debug pointed to a public sub which attempted to select a range in a hidden sheet. There really was no need to actually “select” the range to work with the values therein. Once removed, worked fine (so far).

      2. I would have thought that the error message would be “Select method of range class failed” or something along those lines.

      3. Last week, I lost functionality of part of the help file! Contents of the help file were available, but the “Index” and “Search” displayed a horizontal bar with double arrow ends. Reinstalled Office and help file is back.

      4. All I can think is that my hard drive is thinking of early retirement weep surrender

    Viewing 1 reply thread
    Reply To: Automation Error (2000 SR1)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: