Remove a Macro in Excel

Removing a user-generated macro from a Microsoft Excel workbook can be accomplished in a few steps, provided the name assigned to the macro and location of the file are known. If the macro you wish to remove is located in the Personal Macro Workbook, you will need to unhide the the workbook in order to remove any macros stored there. You will also need to enable the Developer tab feature if it's not already enabled. This article provides detailed instructions on how to unhide the Personal Macro Workbook, enable the Developer tab and remove or delete any macro saved to any workbook in Microsoft Excel.

Steps

  1. Enable macros if set to disabled.
    • Click the Office Button in the upper-left corner of the application window and select Excel Options from the pull-down menu. The Excel Options dialog box will open.
    • Click Trust Center to open the Trust Center dialog box.
    • Select Macro Settings from the column on the left.
    • Click "Enable all Macros" listed under Macro Settings in the Trust Center dialog box.
    • Click "OK" to exit the dialogue box.
  2. Unhide the personal macro workbook file in order to delete any unwanted macros stored inside.
    • Click the View tab on the toolbar or "Ribbon."
    • Click the Unhide button located in the Window menu on the toolbar to open the Unhide dialog box. Any Personal Macro workbooks that have been created will be visible in the Unhide dialog box.
    • Highlight the "PERSONAL.XLSB" workbook and click "OK" to unhide the file and enable access to the file folder and its contents.
  3. Enable the Developer tab. If the Developer tab is not visible in the Ribbon, it can be enabled from the Excel Options menu.
    • Click the Office Button located in the upper-left corner of the application window.
    • Select Excel Options located near the bottom of the pull-down menu. The Excel Options dialog box will open.
    • Select "Popular" from the list of options located in the column on the left.
    • Place a checkmark in the box labeled "Show Developer tab in the ribbon"
    • Click "OK" to exit the dialog box. The Developer tab will now be accessible in the Ribbon.
  4. Remove or delete the unwanted macro from the specified workbook.
    • Click the Developer tab and find the Code menu or "Code group" located in the Ribbon.
    • Click the Macros button in Code group on the Developer Ribbon. The Macros dialog box will open.
    • Click the down-pointing arrow next to the box labeled "Macros in" and select the workbook containing the unwanted macro. A list of the macros stored in the selected workbook will appear in the Macro name box.
    • Highlight the unwanted macro and click the delete button in the dialog box.



Related Articles

Sources and Citations