VBA & Macro Problems

How to Save and Delete Macros in Excel 2019

Olivia MillerOlivia Miller Nov 14, 2026 868 views

Question details

Save personal macros in Excel 2019 and remove unwanted macro procedures.

How to Save and Delete Macros in Excel 2019
Product
Microsoft Excel 2019
Device & OS
not provided
Scenario
The user wants macros available for future work and needs to delete incorrect macros.
Observed behavior
Excel may not allow a macro to be saved directly in a startup file or deleted from its current location.
Before you start

Identify whether the macro belongs to the Personal Macro Workbook, a separate workbook, or an add-in. Confirm that you can edit the relevant VBA project and that the procedure is no longer needed.

Solution 1Recommended

Save macros in the Personal Macro Workbook or an XLSM file

Use the Personal Macro Workbook for macros you want available across workbooks, or an XLSM file for macros tied to one workbook.

1
Create the personal workbook

In Excel, select View > Macros > Record Macro. Under Store macro in, choose Personal Macro Workbook, start recording, and then select Stop Recording.

2
Add or edit your macro

Open the Visual Basic Editor from Developer > Visual Basic or, on Windows, press Alt+F11. In Project Explorer, find VBAProject (PERSONAL.XLSB) and add or edit the procedure in an appropriate module.

3
Save the personal workbook

Close Excel and choose Save if prompted to save changes to the Personal Macro Workbook. Excel normally opens PERSONAL.XLSB as a hidden workbook at startup.

4
Use a separate workbook instead

For a workbook-specific macro, select File > Save As and choose Excel Macro-Enabled Workbook (*.xlsm). Save the VBA procedure in that workbook's project.

Save macros in the Personal Macro Workbook or an XLSM file
Startup location: The Personal Macro Workbook normally resides in Excel's XLSTART folder. A separate workbook can also be placed in a configured startup folder if it needs to open automatically, but it should not replace PERSONAL.XLSB.
Free Microsoft Office alternative

Work with Excel files in WPS Spreadsheet

WPS Office is a free, lightweight alternative with a familiar spreadsheet interface and support for common Excel formats, making it easy to bring existing files into your workflow. It does not fix Excel's macro-saving or deletion restrictions; VBA features depend on the WPS edition and environment.

Open and edit Microsoft Excel XLSX and XLS files.Use a familiar spreadsheet interface for everyday workbook tasks.Move existing spreadsheets into a lightweight Office alternative.Check VBA support for your edition before relying on macro-enabled workflows.
microsoft office alternative - wps office

Frequently Asked Questions

Where should I save macros that I use in multiple workbooks?

Store them in PERSONAL.XLSB, the Personal Macro Workbook. To create it, choose View > Macros > Record Macro and select Personal Macro Workbook under Store macro in.

Why can't I delete a macro from the Macros dialog?

The macro may be in a hidden workbook, a protected VBA project, a read-only file, or an add-in. Check its location in Developer > Visual Basic; if the workbook is hidden, try View > Unhide before using the Macros dialog.

What file format preserves workbook macros?

Use File > Save As and select Excel Macro-Enabled Workbook (*.xlsm) for a separate workbook containing VBA macros. The Personal Macro Workbook normally uses the PERSONAL.XLSB format.

How do I delete one macro without deleting the whole module?

Open Developer > Visual Basic, find the module in Project Explorer, and delete only the procedure from its Sub or Function declaration through its matching End Sub or End Function. Then save the workbook.