To change macro settings in Excel, open File > Options > Trust Center, click Trust Center Settings, then choose Macro Settings in the left pane. Pick the option you want (for example "Disable all macros with notification" for the safest everyday setting), tick or untick the developer options you need, and click OK twice to save. This controls whether Excel runs VBA code, shows a security warning bar, or blocks macros outright.

Macro settings matter because VBA code can do almost anything to your files and your PC — good macros automate repetitive work; malicious ones can install software or delete data. The right setting balances that convenience against risk. Menu labels can differ slightly by Excel version, platform and region, so if you do not see an exact wording below, look for the closest equivalent in the same area. These steps are for Excel on Windows and Mac desktop apps; Excel on the web cannot run macros at all.

What You'll Need

  • Excel installed on Windows or Mac (the desktop app — the browser version does not support macros)
  • Administrator rights on the computer if you need to change settings that are locked by a policy
  • To know where your macro-enabled workbooks live, such as a trusted folder you control
  • Optional: the Developer tab visible, which you can enable in the same Options dialog under Customize Ribbon

Step-by-Step

  1. Open the Options dialog. In the desktop app, go to File > Options (on Mac, it is Excel > Preferences on older builds or Excel > Settings on newer ones). Everything below lives in that window.
  2. Go to Trust Center. Select Trust Center in the left pane, then click the Trust Center Settings button on the right. This opens a separate dialog where the security controls live.
  3. Open Macro Settings. Choose Macro Settings in the left pane. You will see the four standard options: Disable all macros without notification, Disable all macros with notification, Disable all macros except digitally signed macros, and Enable all macros (not recommended).
  4. Choose your option. For most home and small-office users, "Disable all macros with notification" is the sensible default: macros stay off, but Excel shows a yellow warning bar when a workbook contains them, and you can enable just that file with one click. Choose "Disable all macros without notification" if you want zero prompts and never run macros. Choose the signed-macros option only if your organization issues signed files. Leave "Enable all macros" alone — it runs anything, including malicious code.
  5. Set the developer options below the list. The checkbox "Trust access to the VBA project object model" should stay unticked unless you write or test code yourself; ticking it lets code read and modify other macros. The checkbox about Excel 4.0 macros ("Enable Excel 4.0 macros when VBA macros are enabled") should normally stay unticked because that older macro type is frequently abused. Do not tick these to make a file work unless you fully trust its source.
  6. Add a safe folder as trusted, if that suits you. Click Trusted Locations in the left pane, then Add new location, browse to a folder you control (for example your own templates folder), and optionally tick subfolders. Files there run macros without the warning bar. Never trust a Downloads folder or a shared drive other people can write to.
  7. Save and close. Click OK in Trust Center Settings, then OK again in Options. Settings apply to the whole Excel application, not one workbook.
  8. Test it. Open a workbook that contains a macro. With the notification option, a yellow bar appears reading roughly "SECURITY WARNING Macros have been disabled" with an Enable Content button. Nothing runs until you click it. Close the file and reopen it — if the bar does not return, that file has been added to trusted documents, which is normal.

Common Mistakes

Choosing "Enable all macros" to stop the warnings is the most frequent and most dangerous mistake — it disables the very warning that protects you, and one bad attachment later costs far more time than clicking Enable Content. Another common error is confusing the notification setting with a permanent allowance: clicking Enable Content for one session does not change the global setting, and reopening the file may warn again unless it is in a trusted location or marked trusted.

People also tick "Trust access to the VBA project object model" as a quick fix for a stubborn workbook. That is almost never the real problem and it widens exposure. A fourth mistake is trusting an entire network share; anyone who can drop a file there can run code. Finally, remember that changing macro settings in Excel does not change Word, PowerPoint or Outlook — each Office app has its own Trust Center and must be set separately.

Tips

  • Keep the notification option as your default rather than turning macros fully off: you keep protection but retain the ability to run a known-good file when needed.
  • Check the digital signature on the warning bar before enabling anything — a valid, recognizable publisher is a good sign, though not a guarantee.
  • Use a dedicated trusted folder for your own recurring workbooks and leave everything else behind the warning bar.
  • If you only need automation now and then, consider ordinary formulas, Power Query or a template instead of macros — they carry no VBA risk.
  • When sharing workbooks with macro users, save as .xlsm and tell them why the warning appears; an .xlsx file silently loses the code.
  • In managed organizations, macro policy may override your choice; in that case only IT can change it.

Troubleshooting

If the macro settings you pick do not stick, or the option is greyed out, a Group Policy or administrator setting from your organization is likely enforcing it. Contact IT rather than trying workarounds; that lock is deliberate.

If a workbook still shows the warning bar even after you set "Disable all macros with notification", that is expected — the setting does not auto-enable files. Click Enable Content, or move the file into a trusted location. If Enable Content appears but the macro then fails, the problem is code, not security: a common cause is a macro written for 32-bit Office running on 64-bit Office, or references to missing add-ins.

If macros never run despite enabling content, check whether the file came from the internet and is marked blocked in its properties; Windows can attach a mark-of-the-web that Excel respects. Right-click the file, open Properties and look for an Unblock checkbox — but unblock only files you obtained from a source you trust. On Mac, confirm you are in the desktop app and that the workbook is not open in read-only mode from a cloud sync conflict. If the Trust Center dialog itself will not open, close all Office apps, restart the computer and try again; if it still fails, repair the Office installation from the system's app settings.

Frequently Asked Questions

Do macro settings apply to all my workbooks?

Yes. Trust Center changes are application-wide for Excel, with the exception of files you add to Trusted Locations or mark as trusted documents, which skip the warning individually.

What is the safest macro setting?

"Disable all macros with notification." It blocks all code by default but lets you enable a specific, trusted file after seeing the warning.

Why is "Enable all macros" marked not recommended?

Because it removes the last line of defense: any workbook you open can run code without asking, which is exactly how macro-based malware spreads.

Can I run macros in Excel on the web?

No. The browser version does not run VBA. You need the Windows or Mac desktop app, and in most cases a Microsoft 365 subscription or a licensed desktop install.

Does changing macro settings affect Word and PowerPoint?

No. Each Office application has its own Trust Center, so set macro options separately in each app where you need them.

Will enabling content once keep the macros enabled forever?

For that file, usually yes while it remains trusted or stays in a trusted location. Otherwise Excel may warn again the next time you open it, which is by design.