How to Fix Excel Macro Recorder Creating Blank Procedures
Question details
The user needs to resolve an issue where the Excel Macro Recorder generates empty procedures instead of recording user actions.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Recording macros after migrating to Microsoft 365 and converting standard data ranges into tables.
- Observed behavior
- Newly recorded Excel macros contain only the procedure declarations (Sub and End Sub) with no recorded actions inside, and no error messages are displayed.
Before troubleshooting, ensure your workbook is saved in a macro-enabled format (.xlsm or .xlsb) and verify that you are initiating the macro recording in the correct active workbook.
Test Recording in a New Workbook or Outside Tables
Isolate the issue to determine if the problem is specific to Excel tables or corrupted elements within the current workbook.
In Microsoft 365, the Macro Recorder can sometimes struggle to capture actions performed specifically within formatted Excel Tables (ListObjects). Testing in a clean environment helps identify if the table structure is the root cause.
Press Ctrl + N to open a new blank workbook. Go to the Developer tab, click 'Record Macro', perform a few basic actions like typing text or changing cell colors, and click 'Stop Recording' to see if actions are captured.
If the recorder works in a new file, return to your original workbook. Copy a range of data outside the formatted table and try recording actions on that standard range.
If the macro works outside the table but fails inside it, click anywhere inside your table, navigate to the Table Design tab, and click 'Convert to Range' before recording your macro.

Verify Trust Center Macro Settings
Ensure that macros are fully permitted to run and record properly by adjusting Excel's built-in Trust Center security settings.
Disable Conflicting Add-ins
Temporarily disable third-party COM and Excel add-ins that might be interfering with the VBA macro recorder's ability to log actions.
Looking for a Stable Office Suite? Try WPS Office
If you frequently encounter frustrating errors and glitches in Microsoft Excel, consider switching to WPS Office. It provides a lightweight, highly compatible, and free alternative with a familiar user interface that supports your daily spreadsheet and macro tasks seamlessly.

Frequently Asked Questions
Why does my Excel macro only record 'Sub' and 'End Sub'?
This typically occurs when Excel fails to capture your actions due to strict Trust Center security settings, interference from third-party COM add-ins, or bugs related to recording actions inside formatted Excel Tables in newer versions of Microsoft 365.
Can I record a macro inside an Excel Table?
Yes, you can record macros inside tables, but certain complex structural changes or filtering actions might occasionally fail to record properly. If the recorder stops capturing actions, try recording the actions on a standard data range first, and then convert it to a table later.
How do I know if my Excel workbook is macro-enabled?
A macro-enabled workbook is saved with the file extension .xlsm or .xlsb. Additionally, the file icon in your computer's file explorer will display a small scroll or exclamation mark on it, distinguishing it from standard .xlsx files.




