Fix Missing Excel VBA and Macros When Workbook Still Runs
Question details
The user needs to locate custom VBA code and macros that are actively executing in an Excel workbook but do not appear in the Visual Basic Editor or macro list.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Trying to locate, view, or edit existing VBA code or macros that continue to function within an active Excel file.
- Observed behavior
- The Visual Basic Editor and macro list appear completely empty, despite the workbook successfully running custom functions, macros, and automated startup processes.
Ensure your file is saved as a Macro-Enabled Workbook (.xlsm) or Excel Binary Workbook (.xlsb), and verify that macros are fully enabled in your spreadsheet software's Trust Center settings.
Check the Personal Macro Workbook and XLStart Folder
Macros that execute in the background but seem missing from your current file are often stored globally in your Personal Macro Workbook or an auto-loaded startup file.
Excel automatically loads files located in the XLStart folder upon opening. If your custom functions are running but the current workbook's VBA project is empty, the code is likely housed in a globally loaded file like PERSONAL.XLSB.
Press Alt + F11 on your keyboard to launch the Visual Basic Editor interface.
Look at the Project Explorer pane on the left side of the screen. Search for a project named VBAProject (PERSONAL.XLSB).
Expand the modules folder under PERSONAL.XLSB to see if your missing macros and custom functions are stored there.
Open File Explorer and navigate to C:\Users\username\AppData\Local\Microsoft\Excel\XLStart to verify if there are any other macro-enabled files launching automatically with Excel.

Inspect Excel Add-ins and Office Scripts
If the VBA project is completely empty, the automated tasks might be driven by external Add-ins or modern Office Scripts rather than traditional VBA macros.
Unhide the VBA Project and Verify the File Version
The macro code might be hidden by project protection settings, or you might be viewing a macro-free copy of the original workbook.
Easily View and Manage VBA Macros with WPS Office
WPS Office provides robust native support for VBA macros, offering a seamless experience for troubleshooting, editing, and running custom scripts. With its intuitive built-in Visual Basic Editor, you can easily track down missing macros and manage complex automated workbooks.
- 1. Open Your Macro Workbook: Launch WPS Spreadsheet and open your macro-enabled file (.xlsm or .xlsb).
- 2. Access the Developer Tab: Navigate to the Developer tab located on the top ribbon interface to access macro tools.
- 3. Open the Visual Basic Editor: Click the 'Visual Basic' button or press Alt + F11 to reveal the project explorer and locate your macro code.

Frequently Asked Questions
Why did my macros disappear after saving my Excel file?
If you accidentally saved your workbook as a standard Excel Workbook (.xlsx) instead of a Macro-Enabled Workbook (.xlsm), all VBA code is automatically stripped out. Always ensure you select the correct macro-enabled format when saving.
How can I view macros stored in my Personal Macro Workbook?
Press Alt + F11 to open the VBA Editor, then look for 'PERSONAL.XLSB' in the Project Explorer window on the left. Expand its modules folder to view the macros. If it is hidden, you can unhide it from the View tab in the main Excel window.
Can Office Scripts replace my missing VBA macros?
Yes, modern automated tasks in Excel can be built using Office Scripts instead of VBA. If your workbook runs automated sequences but has no VBA code, navigate to the Automate tab on the ribbon to check for active Office Scripts.




