Blog
How to Enable Macros in Excel When They're Blocked
To enable macros in Excel for a file you trust, select Enable Content on the yellow Security Warning bar that appears under the ribbon when the file opens. If the file came from an email attachment or a download, you may see a red Security Risk banner instead, with no Enable Content button at all. Since 2022, Microsoft 365 blocks macros in files from the internet by default. For those files, you unblock the file in its Properties or store it in a Trusted Location, and then macros can run.
Macros save hours on repetitive work, and they are also one of the most common ways malware gets into a company. So the order matters: identify which warning you're looking at, confirm the file is what you think it is, then allow macros as narrowly as possible, for that file or that folder only.
Which files contain macros
Macros live in .xlsm (macro-enabled workbook), .xlsb (binary workbook) and the older .xls format. A standard .xlsx can't hold macros: if you save a macro workbook as .xlsx, Excel warns you that the VBA project will be removed, and it is. If a macro disappeared overnight, check whether someone re-saved the file as .xlsx. When you save a new macro file, choose Excel Macro-Enabled Workbook in Save As.
The yellow Security Warning: Enable Content
With default settings, opening a macro workbook shows a yellow bar saying macros have been disabled, with an Enable Content button. You can still read and edit every sheet; only the macros are off.

According to Microsoft's Enable or disable macros article, selecting Enable Content makes the file a trusted document, so it opens without the prompt next time. The same article is blunt: never enable macros unless you know what they do and want that functionality, and you never need macros just to view or edit a file. If you only need to read the numbers, close the bar and carry on.
The red Security Risk banner: macros blocked from the internet
Why the file is blocked
Windows adds a Mark of the Web to files saved from the internet or from email attachments. Microsoft's Macros from the internet are blocked by default documentation explains that Office blocks macros in files with that mark and shows a Security Risk banner saying the macros were blocked because the source of the file is untrusted. The change reached Current Channel in Version 2206, starting July 27, 2022. It applies to Office on Windows only, not to Office for Mac, mobile or the web.
The same page lays out the order of checks Excel runs. Is the file in a Trusted Location? Is the macro signed by a trusted publisher? Does company policy allow or block it? Was the file already trusted with Enable Content before the change? If none of those apply and the file carries the Mark of the Web, the macros are blocked. That's why changing the Trust Center macro setting doesn't help with this banner: the internet check comes first.
Unblock a single file
- In File Explorer, go to the folder where the file is saved.
- Right-click the file and select Properties.
- On the General tab, tick Unblock near the bottom and select OK.
- Open the file in Excel again. Now you get the yellow bar, and Enable Content runs the macros.
For email attachments, save the file to a folder first rather than opening it straight from the email, then follow these steps. The mark only exists on NTFS drives, so a file opened from a FAT32 USB stick won't show this banner.
No Unblock checkbox
Files opened from a company file share may not show Unblock. If the share is reached by IP address, such as \\10.0.0.25\finance, Windows treats it as the internet zone and blocks macros. IT can add that server to Trusted Sites or the Local intranet zone to fix it for everyone.
Files from OneDrive and SharePoint
Downloading a file through the browser adds the Mark of the Web. Opening it with Open in Desktop App, or from a folder synced by the OneDrive client, doesn't. For a macro file you use every week, opening it from the synced folder is the simplest fix.
When your administrator blocked it
If the message says your administrator has restricted macros, personal settings won't change anything. Microsoft's blocked macro guidance says to upload the file to OneDrive or another location your IT admin allows and save it there. Ask IT which locations qualify.
Set up a Trusted Location
For a folder of macro files you use regularly, make it a Trusted Location. Files there skip the internet check and open with macros enabled.
- Go to File > Options > Trust Center and select Trust Center Settings.

- Select Trusted Locations, then Add new location.
- Browse to the folder, tick the subfolder option if you need it, and select OK.

Anything placed in that folder runs its macros silently. Never add Downloads, Desktop or any folder where arbitrary files land; create a dedicated folder for the macro workbooks you rely on and trust only that. Microsoft also advises against making network locations trusted.
Trust Center macro settings
Under File > Options > Trust Center > Trust Center Settings > Macro Settings there are four options. In Excel the names say "VBA macros."
- Disable VBA macros without notification: no macros, no prompts. The safest setting for anyone who doesn't use macros.
- Disable VBA macros with notification: the default. Macros are off, and the yellow bar lets you enable them file by file.
- Disable VBA macros except digitally signed macros: only macros signed by a trusted publisher run. Useful when the company signs its own macros.
- Enable VBA macros (not recommended): every macro runs without asking, including one hidden in a phishing attachment.
The setting applies to Excel only; Word and PowerPoint keep their own. If your company manages these settings by policy, the options appear locked.
Safety checks before you enable anything
Microsoft's guidance for blocked macros boils down to three questions:
- Were you expecting this file? An attachment you didn't expect is suspect even when it appears to come from someone you know.
- Is a stranger urging you to enable content? Fake order cancellations, legal notices and invoices are the classic lure. A legitimate company won't ask you to run a macro to cancel an order.
- Does the file itself tell you to click Enable Content? A big "Enable content to view this document" message on the first sheet is a red flag.
One more check is worth the minute it takes. Press Alt+F11 to open the VBA editor; you can read the code without running it. Code that combines sheets and totals columns looks very different from code that deletes files or connects to a web address. If the VBA project is password-locked and the file's origin is uncertain, that alone is a reason not to enable it.
Worked example: a branch report, start to finish
The accounting clerk at Crestview Foods runs a weekly receivables summary from a macro workbook that each branch fills in. This Monday the branch file arrives by email from the Denver branch, and after saving and opening it, a red Security Risk banner appears and the summary button does nothing.
- Confirm the source. It's the same internal file from the same branch manager, sent every week; a quick message confirms they sent it.
- Read the code. Alt+F11 shows a macro that copies each branch sheet into a summary sheet and totals by customer. Nothing else.
- Unblock. Close Excel, open the file's Properties, tick Unblock.
- Reopen. The yellow bar appears; Enable Content and the button works.
- Fix it for next week. Create a folder just for this workbook, add it as a Trusted Location, and save each week's branch files there before opening them.
The clerk's first attempt was to switch the Trust Center to Enable VBA macros. The red banner stayed, because the internet check runs before the macro setting. They set it back to the default and unblocked the file instead, and with the Trusted Location in place, they don't need to unblock every week.
👉 Remove Duplicates in Excel: 4 Ways and Which Columns to Pick
FAQ
Q. I enabled macros and they still don't run.
Check three things in order: the file is a macro format such as .xlsm, it doesn't carry the Mark of the Web, and company policy isn't blocking it. If you see the red banner, Trust Center settings won't help; unblock the file.
Q. Why not just set Excel to enable all macros?
Because every file you open afterwards runs its macros without asking, including a malicious attachment. Allow specific files or a dedicated folder, and leave the setting at its default.
Q. Does the Mac show the same red banner?
No. The internet macro block applies to Office on Windows. Excel for Mac asks whether to enable macros when you open a workbook that contains them.
Q. How can I tell whether a file contains macros before opening it?
Look at the extension. Turn on View > Show > File name extensions in File Explorer so .xlsm and .xlsx are easy to tell apart; a plain .xlsx can't contain VBA macros.
How inline AI keeps macro work moving
Macros tend to stop working the day their author leaves or a security update arrives. inline AI does what the macro did, combining branch sheets and totaling by customer, directly in the open workbook, so nobody has to lower security settings, and a weekly routine like this can become an app built by describing it in App builder.
Hand your documents and your company’s work to inline AI.
Keep a file open, say what you need, and AI edits it or drafts a new one. Add the company AI OS and AI runs the rest of the work, ERP included.
Book a demo



