How to enable macros in Excel on Windows and Mac
Enable a trusted Excel macro, understand blocked internet files, and find the correct Windows or Mac settings without enabling every macro.
Enable macros only for a workbook whose source and code you trust. In Windows desktop Excel, a trusted file may show Enable Content; an internet-downloaded file can instead be blocked. On Mac, review Excel → Preferences → Security. Keep notification-based protection enabled rather than allowing every macro.
Choose the right route
| What you see | What to do |
|---|---|
| A warning with Enable Content | Verify the workbook, then approve that document if appropriate |
| A message saying Microsoft blocked macros from an untrusted source | Use the blocked-file checks below; changing every workbook's settings is not the first step |
| No warning and the macro will not run | Check the file, app and your organization's policy |
| Excel in a browser | Open the workbook in desktop Excel to work with VBA macros |
You do not need macros just to read or edit ordinary cell data. If an invoice or unexpected attachment tells you to enable them to reveal its contents, stop and verify it through a separate trusted contact. Keep a copy of important work before running automation that changes data.
Enable a trusted workbook on Windows
Verify who supplied the file and what the macro is supposed to do.
Open it in desktop Excel. If a security notification offers Enable Content, select it only after verification.
Confirm the trust dialog if you want to trust that document.
Run the intended action and check the result against what the workbook's author described.
Approval makes the document trusted; it is not proof that its code is harmless. Microsoft explains this behavior in its macro enablement instructions.
When macros in a downloaded file are blocked
Windows Office can block VBA macros in files marked as coming from the internet. That message differs from the ordinary notification above.
For a verified file on a personally managed computer, Microsoft's blocked-internet-macros guidance describes closing the workbook, opening its Windows file Properties, and checking Unblock if that option is available. Apply the change and reopen the file. This removes a security marker: use it only when you understand and trust the file.
If there is no Unblock option, or the file belongs to your work or school, follow that organization's policy or ask its administrator. Do not move an unverified download into a trusted folder as a workaround.
Check Windows macro settings
Open File → Options → Trust Center → Trust Center Settings → Macro Settings. Excel's notification-based setting lets you decide per workbook. Microsoft's macro-security reference identifies notification-based blocking as the default; it is not the same as allowing only signed macros.
Signed-only settings depend on publisher trust. A signature is useful evidence about origin, not a guarantee about what code will do. Leave Enable VBA macros off as a general setting. You also do not need to enable programmatic access to the VBA project merely to run an ordinary workbook macro.
Check macros on a Mac
In desktop Excel, open the Excel menu.
Select Preferences, then Security.
Keep Disable all macros with notification selected when you want to review macro-bearing documents individually.
Reopen the trusted workbook and review the warning it presents.
These are Microsoft's documented Mac macro-security controls. The Windows Trust Center path does not apply on Mac. Allowing all macros suppresses protection for other files too, so it is not a one-file approval.
If it still does not work
Settings are unavailable: your administrator may manage them. Ask IT rather than changing security policies.
You are using Excel for the web: Microsoft says it cannot create, run or edit VBA macros. Use its desktop-app guidance.
The macro runs but produces the wrong result: security settings are no longer the main diagnosis. Stop, preserve your original data, and ask the workbook's author to check its code and platform requirements.
Before returning to normal work, confirm that you have not enabled all macros globally. Keep the original file and a recoverable copy of data until you have checked the automation's result.
AI-assisted publication. Source checks are not device testing. How we make guides


