How to Save and Delete Macros in Excel 2019
Question details
Save personal macros in Excel 2019 and remove unwanted macro procedures.

- 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.
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.
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.
In Excel, select View > Macros > Record Macro. Under Store macro in, choose Personal Macro Workbook, start recording, and then select Stop Recording.
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.
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.
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.

Delete an unwanted VBA procedure or module
Use the Visual Basic Editor when a macro cannot be deleted from Excel's macro list.
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.

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.




