Software⏱️ 3 min read📅 2026-06-15

How to Fix: Error: The Macro May Not Be Available In This Workbook Or All Macros May Be Disabled

Error in VBA macro not available due to macro settings.

Quick Answer: Check if the macro is enabled and set to run in the current workbook.

The error 'Macro May Not Be Available In This Workbook Or All Macros May Be Disabled' occurs when you try to run a macro in Excel that is not enabled or is not available in the current workbook. This issue affects users who have disabled macros with notification settings, even if they enable them.

This error can be frustrating because it prevents users from utilizing macros to automate tasks and improve productivity. In this guide, we will walk you through the steps to resolve this issue and get your macro up and running.

⚠️ Common Causes

  • The primary reason for this error is that the macro may not have been enabled or saved correctly in the workbook. When you save a macro, it gets stored in the ThisWorkbook object, which allows you to access it from other workbooks. However, if you only save it to the sheet, it will not be available.
  • Another possible reason is that the macro settings in the Trust Center are set to 'Disable all macros with notification', which prevents any macros from running.

🚀 How to Resolve This Issue

Enable Macros via VBA Editor

  1. Step 1: Open the Visual Basic for Applications (VBA) editor by pressing Alt + F11 or navigating to Developer > Visual Basic in the ribbon.
  2. Step 2: In the VBA editor, go to Tools > References and check if 'Microsoft Excel Object Library' is listed. If it's not, check box the option to add a reference.
  3. Step 3: Go back to your workbook and click on the 'Developer' tab in the ribbon. Click on the 'Macro' button and select 'Enable All Macros'.

Set Macro Settings in Trust Center

  1. Step 1: Open the Trust Center by navigating to File > Options > Trust Center.
  2. Step 2: In the Trust Center, click on the 'Trust Center Settings' button and select the 'Macro Settings' tab.
  3. Step 3: Select 'Enable all macros except digitally signed macros from the internet' or 'Disable all macros with notification'.

🎯 Final Words

To resolve the error 'Macro May Not Be Available In This Workbook Or All Macros May Be Disabled', you can try enabling macros via the VBA editor or setting your macro settings in the Trust Center. By following these steps, you should be able to get your macro up and running, allowing you to automate tasks and improve productivity.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions