Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Excel Macro Disabled? How to Enable Macros Safely

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Excel blocks macros by default, and it does so for good reason: a macro is code, and malicious macros remain one of the most common ways malware spreads through documents. If you see a message that macros are disabled, or a button that will not run, the fix is to open the file from a Trusted Location or adjust the macro security setting in the Trust Center. The exact clicks differ slightly between Excel for Windows and Excel for Mac, and menu labels can vary a little by version and region, so treat the paths below as a guide and look for the closest match in your copy of Excel.

What You'll Need

  • Excel for Windows or Excel for Mac, with the file already saved somewhere on your computer or in a trusted network folder.
  • Permission to change Excel's security settings. On a work or school computer, these settings are often controlled by your IT department and you may not be able to change them yourself.
  • A clear idea of where the file came from. Only enable macros in files you or someone you trust created; never enable them in an unexpected attachment.

Step-by-Step

  1. Check the yellow bar first. When you open a file that contains macros, Excel usually shows a yellow Security Warning bar below the ribbon with a button such as Enable Content. If you trust the file, click that button. This is the quickest fix and does not change any permanent setting.
  2. Confirm the file type. Macros only run in macro-enabled formats. A workbook saved as .xlsx cannot store or run VBA code, even if it once did. Look at the title bar: if the file ends in .xlsx, use File > Save As and choose Excel Macro-Enabled Workbook (*.xlsm), then reopen it.
  3. Open the Trust Center. Go to File > Options > Trust Center > Trust Center Settings. On Excel for Mac, the path is Excel > Preferences > Security & Privacy. These dialogs are where all macro security settings live.
  4. Review the macro settings. In the Trust Center, select Macro Settings. You will normally see four choices: disable all macros without notification, disable all macros with notification, disable all macros except digitally signed macros, and enable all macros. The recommended setting is Disable all macros with notification, because it lets you approve trusted files one at a time via the yellow bar.
  5. Choose the setting that matches your situation. If you are running your own macros and the yellow bar is not appearing, select Disable all macros with notification and reopen the file. Avoid Enable all macros unless you fully understand the risk; it removes the warning for every file you open.
  6. Add a Trusted Location if you run the same files repeatedly. In the Trust Center, open Trusted Locations and add the folder that holds your macro workbooks. Files in a Trusted Location open with macros enabled and no prompt. Only add folders you control, and never add your entire Downloads folder.
  7. Close and reopen the workbook. Macro security settings are read when a file opens, so changes do not apply to the file that is already open. Save your work, close Excel completely, and reopen the file.
  8. Test with a simple macro. Press Alt+F11 (Windows) or Option+F11 (Mac) to open the Visual Basic Editor, or use the Developer tab if it is visible. Run a short macro to confirm the setting took effect. If the Developer tab is missing, enable it under File > Options > Customize Ribbon and tick Developer.

Common Mistakes

  • Choosing "Enable all macros" as a permanent fix. It silences the warning for every document, including malicious ones. Use Trusted Locations or the per-file prompt instead.
  • Editing settings while the file is open. The change applies only to files opened afterwards, so people conclude the fix did not work.
  • Ignoring the file extension. A macro will never run from .xlsx or .xlsb in the way you expect; save as .xlsm.
  • Adding broad folders to Trusted Locations. Adding Downloads or Desktop means anything saved there runs without a prompt.
  • Assuming a work computer is broken. Group Policy often overrides your local Trust Center choices, and the options appear greyed out.

Tips

  • Prefer digitally signed macros when you can. A trusted publisher's signature lets the file run under the stricter "except digitally signed macros" setting.
  • Keep the yellow bar visible rather than disabling notifications. It gives you a decision point for each file.
  • If you only need to run a macro once, use the prompt rather than changing global settings.
  • Store macro workbooks in one dedicated folder and add only that folder as a Trusted Location.

Troubleshooting

If the yellow bar never appears, the macro setting is probably "disable all macros without notification." Change it to "disable all macros with notification" in the Trust Center and reopen the file. If the Trust Center options are greyed out, your organisation manages them; contact IT rather than trying to work around it. If the file opens but the macro still will not run, check that it is saved as .xlsm and that the code is in a standard module, not a sheet module that requires a specific trigger. If Excel shows a message about the file being blocked, right-click the file in File Explorer, open Properties, and look for an Unblock checkbox on the General tab; clear it only if you trust the source. On Mac, also check System Settings > Privacy & Security for any prompt about the file. Finally, repair Office from the Windows settings if macros fail in every workbook, and reinstall only as a last resort.

Frequently Asked Questions

Why does Excel disable macros by default?

Because macro code can run commands on your computer, and malicious documents are a common attack route. The default protects you from opening a harmful file by accident.

Is it safe to click Enable Content?

Only if you know and trust the file's source. If the file arrived unexpectedly by email or download, do not enable it; ask the sender to confirm.

Why is the Enable Content button missing?

The macro setting is likely set to disable all macros without notification, or the file is not in a macro-enabled format. Check both.

Can I enable macros for one file only?

Yes. Use the yellow bar prompt for that file, or place it in a Trusted Location. Avoid changing the global setting to enable all macros.

Why are the Trust Center options greyed out?

Your organisation's policy is controlling them. Only an administrator can change those settings.

Do macros work in Excel for the web?

No. VBA macros do not run in Excel for the web. Open the workbook in the desktop version of Excel to run them.