logo
search
VBA & Macro Problems

How to Delete Macros in Excel's Personal Macro Workbook

Steve KSteve K Oct 7, 2026 871 views

Question details

The user needs to remove macros that persistently load in Excel, which cannot be deleted directly because they are saved in a hidden system workbook.

How to Delete Macros Stored in Excel's Personal Macro Workbook
Product
Microsoft Excel
Device & OS
not provided
Scenario
Cleaning up and removing globally available macros that are no longer needed across Excel sessions.
Observed behavior
The macros remain available after deleting their original workbook because they are stored in Excel's hidden PERSONAL.XLSB file, preventing direct deletion from the standard Macros dialog.
Before you start

Ensure you close all other active Excel workbooks and leave only one blank workbook open to prevent cross-file conflicts before modifying hidden system files.

Solution 1Recommended

Delete Macros Using the Visual Basic Editor

Use the built-in VBA Editor to access the hidden Personal Macro Workbook and manually remove the macro code or module.

Because the Personal Macro Workbook (PERSONAL.XLSB) opens invisibly in the background every time Excel starts, you cannot delete macros from it using the standard Macro dialog box without unhiding the workbook first. The safest and most direct method is using the Visual Basic Editor.

1
Open the Visual Basic Editor

Press the Alt + F11 keys on your keyboard simultaneously, or navigate to the Developer tab on the ribbon and click on 'Visual Basic'.

2
Locate PERSONAL.XLSB

In the Project Explorer pane on the left side of the editor, scroll until you find 'VBAProject (PERSONAL.XLSB)'.

3
Access the Modules Folder

Click the plus sign (+) next to 'VBAProject (PERSONAL.XLSB)' to expand it, then open the 'Modules' folder to reveal the stored macros.

4
Delete the Macro Code

Double-click the module (e.g., Module1) containing your macro. Highlight the specific macro code from 'Sub' to 'End Sub' and press the Delete key. Alternatively, right-click the module and choose 'Remove Module' to delete all macros inside it.

5
Save and Apply Changes

Close the Visual Basic Editor. When you close the main Excel application, you will be prompted to save changes to the Personal Macro Workbook. Click 'Save' to permanently finalize the deletion.

Delete Macros Using the Visual Basic Editor
Important Saving Prompt: If you are not prompted to save PERSONAL.XLSB upon exiting Excel, your changes will be lost. Always ensure you click 'Save' when the prompt appears to apply the deletion globally.
Manage Macros Easily

Manage and Delete Macros Effortlessly with WPS Office

If you want a more straightforward way to handle your spreadsheets without dealing with complex hidden background files like PERSONAL.XLSB, try WPS Office. It provides an intuitive interface for managing VBA macros while maintaining full compatibility with Microsoft formats.

  1. 1. Open Developer Tools: Launch WPS Spreadsheets and click on the 'Developer' tab located on the top ribbon menu.
  2. 2. Access the Macros List: Click the 'Macros' button to open a clear dialog box displaying all active macros in your current session.
  3. 3. Delete with One Click: Select the unwanted macro from the list and simply click the 'Delete' button to remove it instantly, bypassing any hidden workbook confusion.
Fully compatible with Microsoft Excel macro formats, including .xlsm and .xlsb files.Clean and intuitive Developer tab makes VBA code and macro management incredibly simple.Free and lightweight, allowing large workbooks to run automated tasks without sluggishness.
QA img-9

Frequently Asked Questions

Why is the Delete button grayed out in the Excel Macro dialog?

The Delete button is disabled because the macro is stored in a hidden workbook, such as the Personal Macro Workbook (PERSONAL.XLSB). Excel locks these macros from direct deletion. You must either unhide the workbook first or delete the macro via the Visual Basic Editor.

What happens if I delete the entire PERSONAL.XLSB file from my computer?

If you locate the PERSONAL.XLSB file in your system's XLSTART folder and delete it, all global macros you have ever recorded or saved to it will be permanently removed. Excel will automatically generate a new, blank PERSONAL.XLSB file the next time you choose to record a new global macro.

How do I unhide the Personal Macro Workbook to edit it directly?

To unhide it, go to the View tab on the Excel ribbon, click on 'Unhide' in the Window group, and select PERSONAL.XLSB from the popup dialog. Once visible, you can manage its macros normally before hiding it again.