- Before you enable macros in an Excel file
- Enabling macros in Excel for one trusted workbook
- Changing Excel macro settings in the Trust Center
- When Excel says macros have been blocked
- Using a trusted folder for Excel macro files you rely on
- Macros in Excel for small business workbooks
- Frequently asked questions
To enable macros in Excel, open the workbook and select Enable Content on the yellow security bar, then Yes if asked to trust it. Microsoft's warning matters most: only do this for files you're sure about, because you don't need macros just to view or edit a workbook.
That yellow bar across the top of a workbook, the one with the Enable Content button, is Excel asking you a security question. Macros are little programs that automate repeat jobs, and they're brilliant when they come from your accountant's template or your own reporting file. They're also one of the oldest tricks for sneaking malware onto a computer.
So I'll show you how to switch macros on for one file you trust, where the wider setting lives, and what to do when Excel won't even give you the button. First, though, Microsoft's own warning, because it's the bit people skip.
Before you enable macros in an Excel file
Microsoft's help says you should never enable macros unless you're sure what they do and you want what they provide. It also points out that you don't need macros to view or edit the file. If all you want is to read the numbers, you can ignore the bar.
A quick checklist I run through before clicking anything:
- Was I expecting this file, from someone I know, about something I asked for?
- Did a stranger or a pop-up push me to enable content? Microsoft says that's a common attacker tactic.
- Is the reason odd? Microsoft's page notes that no legitimate company will make you open an Excel file to cancel an order.
If any answer feels off, close the file. Microsoft's advice for a downloaded file you're unsure about is to simply delete it.
Enabling macros in Excel for one trusted workbook
This is the everyday route in Excel for Windows when the yellow security warning appears.
- Open the workbook and look for the Security Warning bar under the ribbon.
- Select Enable Content.
- If a Security Warning dialog asks whether to make the document trusted, select Yes.
The macros now run in that workbook, and Excel remembers it as a trusted document. Microsoft says that to undo this you have to clear all trusted documents, not just one, so be choosy.
Changing Excel macro settings in the Trust Center
If you want Excel to treat every workbook the same way, the setting sits in the Trust Center.
- Select File, then Options.
- Select Trust Center, then Trust Center Settings.
- Select Macro Settings.
- Choose an option and select OK.
If the Developer tab is showing on your ribbon, Developer then Macro Security takes you straight there. Microsoft notes that the change applies only to the app you're in, so changing Excel won't change Word.
| Excel macro setting | What happens |
|---|---|
| Disable VBA macros without notification | Macros and their alerts are switched off |
| Disable VBA macros with notification | Macros are off, but you get the bar to enable them file by file |
| Disable VBA macros except digitally signed macros | Signed macros from trusted publishers run, others show an alert |
| Enable VBA macros | Everything runs with no prompt, which Microsoft labels not recommended |
I'd leave it on Disable VBA macros with notification, which keeps you in charge file by file. Turning everything on is the one choice Microsoft openly calls potentially dangerous.
When Excel says macros have been blocked
Sometimes there's no Enable Content button, just a red bar. Microsoft's help names two different messages, and they need different fixes.
Microsoft has blocked macros because the source is untrusted
This usually means the file came from the internet or an email. If you're sure it's safe, Microsoft's steps for a single file are:
Want AI doing the heavy lifting in your marketing?
I build the systems that handle the boring 80 percent, so you get your week back. Done properly, with the human kept in.
- Close the workbook.
- Open Windows File Explorer and go to the folder where the file is saved.
- Right-click the file and choose Properties.
- At the bottom of the General tab, tick Unblock and select OK.
- Open the file again and use Enable Content.
For a file you received by email, Microsoft suggests saving it to your computer first and then unblocking it, or saving it to OneDrive before opening.
Your administrator has restricted the use of macros
This one comes from your workplace IT settings, not from Excel itself. Microsoft's fix is to upload the file to OneDrive or another location your IT team has approved, then save it. If you still can't run it, it's a conversation with your IT person, because a managed device may not let you change the Trust Center at all.
Using a trusted folder for Excel macro files you rely on
If you run the same macro-filled templates every week, a trusted location saves you clicking Enable Content every time.
- Select File, Options, Trust Center, then Trust Center Settings.
- Select Trusted Locations.
- Select Add new location, then Browse to choose the folder.
- Select OK until every window is closed.
Microsoft warns that files in a trusted location skip some security checks, so keep that folder for your own files only, never your Downloads folder.
A quick word on Excel for Mac and Excel for the web: Microsoft's macro settings page is written around the Windows Trust Center, and the menus differ on other versions. If you don't see the same options, look for security or privacy settings in Excel's preferences, and treat any prompt to enable content with the same caution.
Macros in Excel for small business workbooks
For freelancers and small teams, macros often arrive inside a bookkeeping template or a report a colleague built. Keep a clean copy of any macro file before you run it, so a script that goes wrong can't wreck your only version, and my guide to getting back an Excel file you didn't save is worth bookmarking too. If you share the workbook with others, locking the cells that hold your formulas stops anyone breaking the parts the macro depends on.
Frequently asked questions
Do I need to enable macros to open an Excel file?
No. Microsoft says you don't need to enable macros to view or edit a file. You only need them if you want the automated actions the macros perform.
Why is there no Enable Content button in Excel?
Microsoft may have blocked the file because it came from the internet. If you trust it, right-click the file in File Explorer, choose Properties, tick Unblock and select OK, then open it again.
Is it safe to enable all macros in Excel?
Microsoft labels the Enable VBA macros setting not recommended because potentially dangerous code can run. Disabling macros with notification is the safer middle ground.
How do I stop trusting a workbook I enabled?
Microsoft says you need to clear all trusted documents to revoke one, as there's no single-file option.
Can I change macro settings on a work laptop?
Possibly not. Microsoft notes that if your device is managed by your work or school, the administrator might prevent anyone from changing these settings.


