• enable/disable Macro’s (2003 sp2)

    Author
    Topic
    #439963

    Good morning

    I have 1 workbook which when opened always asks whether I would like to enable or disable Macro’s, I have used Alt F8 and there are no Macro’s anywhere in the aforesaid workbook, the Macro security is set to medium as with all of my workbooks, I have tried Alt + F11 and there is nothing in the VB either. Any ideas anybody please?

    Thanks

    Steve

    Viewing 0 reply threads
    Author
    Replies
    • #1052661

      Have you also verified that the ThisWorkbook module and the modules for the individual worksheets are empty?

      If so, try the following:
      – Right-click a sheet tab and choose ‘Select all sheets’ from the popup menu.
      – Right-click the sheet tab again and choose ‘Move or copy sheet’ from the popup menu.
      – Select ‘(New workbook)’ as destination, tick the ‘Create a copy’ check box and click OK.
      – Save the new workbook.
      – Check whether the new workbook displays a macro warning when you open it.

      • #1052667

        Thank you

        Its quite bizarre though because I double and treble checked the original workbook that there were/are no macros in it but following your instructions the new one opens without the prompt and the original still has the prompt? I noticed however that the original workbook was 2694kb and the new one is 1163 which would suggest to me that there must be a macro somewhere in the original, can you have hidden macro’s and if so how do you get to see them?

        Thanks

        Steve

        • #1052668

          Well, “stuff” gathers over time in the nooks and crannies of a workbook. Copying to a new workbook is a way to get rid of that.

          If the workbook was originally created in a (very) old version of Excel, it may contain hidden macro sheets or dialog sheets (these were the predecessors of VBA modules and userforms); you would need to use special tricks to make them visible and to remove them.

          And sometimes, Excel forgets to remove the VBA “framework” from a workbook after the last macro has been deleted.

        • #1052726

          Was there a module in the workbook? If a workbook contains a module, even if the module contains no procedures or functions, it will trigger the security warning when you open the workbook.

          • #1053087

            Also, a workbook with no code would also trigger the macro warning if the workbook has another workbook (with code) ‘attached’ to it.
            This will be shown in the VBA editor for the workbook with ‘no code’ as an object folder labelled ‘References’

            zeddy

    Viewing 0 reply threads
    Reply To: enable/disable Macro’s (2003 sp2)

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

    Your information: