Excel Macro Disabled? How to Enable Macros Safely

VBA & macros · Updated November 12, 2026

If an Excel macro is disabled, first confirm the workbook is from a source you trust, then check the security warning or the file’s security settings; do not enable every macro just to make one file work. In Microsoft 365 for Windows, the usual setting is File > Options > Trust Center > Trust Center Settings > Macro Settings, but a downloaded file or an organization policy may be the real cause.

What “macro disabled” means

A macro is a set of instructions that automates work in Excel, commonly written in Visual Basic for Applications (VBA). It might format a report, refresh data, or create a series of worksheets. Because VBA can also change files, access information, or perform harmful actions, Excel applies security controls before allowing macro code to run.

“Macro disabled” is not always one specific error. Excel may show a yellow security warning with an Enable Content button, display a red warning that macros have been blocked because the file’s source is untrusted, open the workbook in Protected View, or show no prompt at all because an administrator has set a policy. A macro button that does nothing can also indicate a missing macro, a broken link, or code that encountered an error—not necessarily a security block.

The file format matters too. A standard .xlsx workbook cannot store VBA macro code. Macro-enabled workbooks commonly use .xlsm, while macro-enabled templates use .xltm and Excel binary workbooks may use .xlsb. An add-in containing VBA may use .xlam. Changing a file’s extension does not convert it or add macros; use a suitable file format when saving a workbook that needs to retain VBA.

Check the warning before changing settings

Open the workbook and read the message displayed below the ribbon or near the top of the window. If Excel reports that macros have been disabled, consider where the file came from and whether you expected it to contain code. A familiar filename or a colleague’s name is not proof that a file is safe: email accounts and shared folders can be compromised, and macro code can be changed.

  • If you expected the workbook and can verify its source, ask the sender what the macros do and whether they sent the file through an approved channel.
  • If the workbook arrived unexpectedly, asks you to enable content urgently, or came from an unfamiliar website, do not enable its macros. Contact the sender through a separate trusted channel or delete the file.
  • If the warning says your organization blocked the file or the controls are unavailable, contact your IT administrator rather than trying to bypass the restriction.

Protected View and macro security are related but separate protections. Protected View opens some files in a restricted mode, often because they came from the internet or another potentially unsafe location. If you have verified the source, Excel may offer Enable Editing. That action does not by itself mean you should enable macros; read any separate macro warning and make that decision independently.

Enable macros for one trusted workbook

For a file you have independently determined is safe, the most limited option is usually to enable its content from Excel’s warning bar. In Microsoft 365 for Windows, open the workbook and select Enable Content if Excel presents that option. The wording and warning style can vary with the file’s origin, Office version, and administrator settings. Enabling content permits the workbook’s macros to run, so do not use this control for a file you cannot verify.

If there is no warning bar, check the macro setting. In Excel for Microsoft 365 on Windows, go to File > Options > Trust Center > Trust Center Settings > Macro Settings. A common setting is Disable VBA macros with notification: Excel blocks macros but shows a warning when a workbook contains them. If you change a setting, select the least permissive option that meets your need, close and reopen the workbook, and restore the previous setting afterward if you changed it temporarily.

Do not select Enable VBA macros for all files as a routine fix. Microsoft labels this option as not recommended because it can allow potentially dangerous code to run without the usual warning. Some settings may be unavailable or show that they are managed by an administrator. In that case, the control is governed by organizational policy and cannot necessarily be changed from Excel’s options.

When a downloaded file is blocked

On Windows, Office can block VBA macros in files marked as coming from the internet. This is a separate safeguard from the general macro setting, so selecting a notification option may not make the file runnable. A warning may explicitly say that Microsoft has blocked macros because the source is untrusted. That message is not a recommendation to remove the block automatically; it is a reason to verify the file and its origin.

If you have verified the workbook and your organization permits it, Windows may offer an Unblock option in the file’s properties. Close the workbook, locate it in File Explorer, right-click it, select Properties, and look on the General tab for an Unblock checkbox or button. Apply the change only when you understand why the file was blocked, then reopen it in Excel and review the warning. The option may not appear for every file or Windows configuration.

Do not unblock a file merely because a website says that doing so fixes all macro warnings. An unblock action removes a security signal; it does not scan the VBA or establish that the workbook is trustworthy. If the source is uncertain, ask the sender for a fresh copy through a trusted channel or request that IT review it. Your organization may prohibit unblocking or require a managed approval process.

Trusted locations and signed macros

A trusted location is a folder Excel treats as a trusted source for Office files. Workbooks stored there can be handled differently from files in ordinary folders, which can reduce repeated warnings for a controlled workflow. In Windows Excel, trusted locations are managed through File > Options > Trust Center > Trust Center Settings > Trusted Locations. The exact controls can depend on policy.

Use this feature sparingly. A broad folder such as Downloads, a shared folder where many people can add files, or a folder synchronized from an unverified source is a poor choice: other files placed there may receive fewer warnings too. If your workplace needs a trusted location, ask IT to identify a suitable folder and restrict who can write to it. A trusted location is not a substitute for checking what code does.

A VBA project can also be digitally signed. A signature can help identify the publisher and show whether signed code has changed since it was signed; it does not prove that the code is harmless. If Excel asks whether to trust a publisher, accept only when you have verified the publisher’s identity and your organization’s rules allow it. Trust Center settings for trusted publishers are available in the same Trust Center area, but organizations may manage them centrally.

Why the macro might still not run

If macros appear enabled but the workbook still does not behave as expected, check the file, Excel version, and action you are taking before changing security again. A macro may be attached to a particular button or workbook event, may require another file or add-in, or may fail because the workbook’s layout has changed. A macro-enabled extension only means that the format can contain VBA; it does not guarantee that a working macro is present.

  • Wrong file type: If the workbook was saved as .xlsx, its VBA may have been removed. Ask for the original macro-enabled file rather than renaming the extension.
  • Different Excel app: Excel for the web can open macro-enabled workbooks, but it cannot run or edit VBA macros. Open the file in the desktop Excel app to use its VBA code, if your account and device allow it.
  • Organization controls: A message that settings are managed, a disabled Enable Content button, or a policy warning usually requires help from your administrator.
  • Macro error: If the macro starts and then stops, the cause may be a code error, unavailable data, or a changed workbook structure. Ask the workbook’s author or an authorized VBA maintainer to investigate.
  • Button or assignment issue: A worksheet control may no longer be assigned to the intended macro, or the macro may expect a different sheet or selection. Avoid clicking unfamiliar controls repeatedly.

VBA project protection is another distinct issue. A password prompt to view or edit a project does not mean that Excel has disabled macros, and changing macro security will not reveal password-protected code. If you need to maintain the workbook, contact its owner or follow your organization’s recovery process.

Windows, Mac, and Excel for the web

The steps above describe Microsoft 365 Excel for Windows. On a Mac, Excel also has macro security preferences, but the menus and labels differ from Windows. Look in Excel > Preferences (or Settings, depending on the release) for Security or macro security options. Only change them for a workbook you trust, and consult your organization if the controls are managed. A Windows-specific Unblock checkbox in File Explorer is not a Mac procedure.

Excel for the web does not execute VBA, even if the workbook contains macros. You can use the web app for supported workbook tasks, but running or editing VBA requires desktop Excel. Microsoft 365 accounts that include Office Scripts may offer that separate automation feature in supported versions and environments. Office Scripts are not a one-click replacement for VBA: their available actions and integration differ, so a workbook’s author may need to adapt the automation.

Safer ways to handle recurring automation

If you regularly receive a workbook that requires macros, establish a reliable process instead of lowering security for every file. Confirm who maintains the workbook, obtain it from a known location, and ask what the macro changes before running it. For business-critical tools, have the responsible IT or security team review the code and decide whether a managed trusted location or signed publisher is appropriate.

Make a separate copy before running a macro that changes data. VBA actions generally cannot be reversed with Ctrl+Z, and a macro may overwrite cells, delete sheets, or alter other workbook content. Keep an untouched original and confirm that you can restore the file if the result is wrong. If you are unsure what a macro does, do not run it on important or sensitive data.

Frequently Asked Questions

How do I enable macros in Excel 365?
For a trusted workbook, use the Enable Content control if Excel displays it. Otherwise, check File > Options > Trust Center > Trust Center Settings > Macro Settings on Windows. Do not enable all macros globally, and ask your administrator if the setting is managed.

Why does Excel say macros are blocked because the source is untrusted?
Windows may mark a downloaded file as originating from the internet, and Office can block its VBA macros on that basis. Verify the source first. If your organization permits it, a verified file may have an Unblock control in File Explorer > Properties, but removing the mark does not make unsafe code safe.

Can I run Excel macros in a browser?
No. Excel for the web can open macro-enabled workbooks, but it does not run or edit VBA. Use desktop Excel for VBA, subject to the workbook’s security settings and your organization’s policies.

Why is Enable Content missing or greyed out?
The file may be blocked because of its internet origin, opened in a restricted state, or governed by an organization policy. The workbook may also not contain macros. Read the specific warning and contact IT if settings are managed; do not try to bypass a policy.

Does .xlsm mean the workbook is safe?
No. The .xlsm extension indicates a format that can store VBA, not that the code is trustworthy or even present. Check who supplied the file and whether you expected it before allowing its macros to run.

Related

Try it: the Column Letter to Number: aA is 27, XFD is 16,384. Converts both ways.

More in VBA & macros

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.