• Hidden Auto Open Routine? (Excel 2000)

    Author
    Topic
    #382070

    Hi Everyone,
    I disabled a macro that set the number of decimal places in a spreadsheet and now I get an error message when I open the file – “Cannot find macro name” . To me that sounds like some other macro [perhaps an Auto Open] is looking for the disabled macro. However, the spreadsheet only has two modules, one for the now disabled macro and one for another routine that does not call the now disabled routine. The This Workbook object has nothing in it. Could there be another place for an Auto Open routine? Any Ideas? confused

    TIA

    Viewing 1 reply thread
    Author
    Replies
    • #646498

      How did you disable it?

      Edited to include the following…

      It is possible, depending on the code in the modules, that some of the code is triggering an event which calls the macro you disabled.

      • #646554

        Mike,
        I disabled it by commenting out the code. I tried to attach an abbreviated version of the file but for some reason can’t get in down to the required 100k. I even tried removing all the modules and the file is still 146k and I still get the error message! I’m stumped.

        • #646563

          Have you tried creating a .zip file and attaching the .zip file instead of the .xls itself? WinZip usually achieves a 50% to 80% compression rate on Excel files.

        • #646567

          Are you sure you are in the right project. If you have an add-in running or another workbook open, there will be more than one project. The Open event is in the ThisWorkbook object as Legare says.

          • #646569

            Here is the file [Thanks Hans, for the zip file reminder]. I don’t see a thing. I will be curious to see if you get the error message.

            • #646572

              Hi Sherry,
              You have a defined name Auto_Activate in your workbook which refers to a non-existent range/macro called Inventory_Cursor_Decimals. If you delete the Auto_activate name, the error should go away.
              Hope that helps.

            • #646579

              Sheesh! Am I embarrassed!! blush

              Thanks everyone!!

    • #646504

      The Open event routine is in the ThisWorkbook object. In the VBE find the ThisWorkbook object in the project browser. Right click on it and click on “View code” in the pop up menu. In the left hand drop down list that probably displays “General”, select “Workbook” from the drop down list. In the right hand drop down list select the open event to view the code.

      Also, when you get the error, is there a button in the error box labeled Debug? If there is, clicking that button should take you to the code that is trying to run the macro.

      • #646556

        Legare,
        I did as you said but don’t see anything. The error message only has an “OK” button. In an effort to make the file small enough to attach [to no avail] I removed all the modules. I still get the error message. Now I’m really confused!

    Viewing 1 reply thread
    Reply To: Hidden Auto Open Routine? (Excel 2000)

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

    Your information: