VBA & Macro Problems

Fix Excel Macros That Cannot Be Enabled in Macro-Enabled Workbooks

Aamir Naveed AkramAamir Naveed Akram Nov 12, 2026 869 views

Question details

The user needs to identify why Excel does not allow macros to be enabled after reopening a macro-enabled workbook.

Fix Excel Macros That Cannot Be Enabled in Macro-Enabled Workbooks
Product
Microsoft Excel
Device & OS
not provided
Scenario
A macro-enabled workbook is reopened and the user expects to enable and run its VBA macros.
Observed behavior
Excel offers only the option to disable macros, preventing the workbook's VBA code from running.
Before you start

Close the affected workbook and confirm that it is saved as an Excel Macro-Enabled Workbook (.xlsm) or Excel Binary Workbook (.xlsb). Open a copy of the file for testing so you can compare its VBA project and macro behavior without changing the original.

Solution 1Recommended

Confirm that the workbook still contains its VBA project

Use this first to determine whether the issue is limited to the original workbook or whether its macro project is missing or damaged.

A workbook can retain an .xlsm extension even when its VBA project has been removed or is unavailable. Testing a newly created macro-enabled workbook helps separate a file-specific problem from an Excel configuration problem.

1
Open the Visual Basic Editor

Open the affected workbook in Excel, then press Alt+F11 to open the Visual Basic Editor. In the Project Explorer pane, look for the workbook project and its Modules, ThisWorkbook object, or worksheet code.

2
Check whether the VBA project is present

If the workbook project is missing or contains no expected code modules, restore the workbook from a known macro-enabled copy or ask the file owner for the original .xlsm file.

3
Test a new macro-enabled workbook

In Excel, select File > New > Blank workbook, press Alt+F11, then choose Insert > Module. Add a simple test macro, save the file through File > Save As as Excel Macro-Enabled Workbook (*.xlsm), close it, and reopen it to test whether Excel offers macro enablement.

Confirm that the workbook still contains its VBA project
What the test result means: If macros work in the new .xlsm workbook, focus on repairing or replacing the original file. If they also cannot be enabled in the new workbook, continue with add-in, Safe Mode, Office, and policy checks.
Free Microsoft Office alternative

Open and manage Excel macro-enabled workbooks with WPS Office

If Microsoft Excel macro settings, add-ins, or organization policies continue to prevent normal workbook use, WPS Office is a free, lightweight alternative with a familiar spreadsheet interface and straightforward migration for common Excel files. You can open and edit compatible workbook content while evaluating the macro requirements of your files.

Open common Excel workbook formats, including .xls, .xlsx, and .xlsm files.Use a familiar spreadsheet layout for formulas, worksheets, tables, and workbook editing.Move from Microsoft Office with a lightweight, easy-to-use office suite.Review macro-enabled workbook content before deciding whether VBA-specific automation requires a supported environment.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Excel show only a Disable Macros option when I reopen an .xlsm file?

This can occur when Excel does not recognize a usable VBA project, an add-in interferes with startup, Office components are damaged, or an organization policy blocks macros. Press Alt+F11 to first verify that the workbook's VBA project is present.

How can I tell whether the problem is caused by the workbook or by Excel itself?

Create a new workbook in Excel, add a simple macro through Alt+F11 > Insert > Module, save it as an .xlsm file, and reopen it. If the new file works, the original workbook is likely the source of the problem.

How do I open Excel in Safe Mode to test macros?

Close Excel, then either hold Ctrl while launching Excel and confirm Safe Mode, or press Windows+R, type excel.exe /safe, and select OK. Open the macro-enabled workbook and test whether macros can be enabled.

Can an Excel add-in stop macros from being enabled?

Yes. Go to File > Options > Add-ins, select COM Add-ins in the Manage list, choose Go, and temporarily clear third-party add-ins. Restart Excel and test the workbook, then re-enable add-ins individually to find the conflict.

What should I do if my company blocks Excel macros?

Contact your IT administrator and ask whether Group Policy or endpoint security rules restrict VBA macros. A policy-controlled macro setting cannot be overridden from Excel by a standard user.