Why you might want to turn macros off
A macro in Excel is a recorded set of actions that runs automatically when you open a file or click a button. Macros can be useful — they save time on repetitive tasks like formatting or data entry. But they can also be a security risk. Malicious macros can steal data, install malware, or lock your files until you pay money.
Excel gives you control over when macros run. By default, Excel disables macros from files you read or receive by email, and shows you a notification bar asking whether to enable them. You can tighten this further by blocking macros entirely, or by allowing them only in files you trust.
The choice depends on your situation. If you work with Excel files from people you know and trust, the default setting is usually fine. If you read files from the internet or receive them from unfamiliar senders, you can disable macros completely or review them before allowing them to run.
Key Takeaways
- Excel blocks macros by default in files from the internet or email, but shows a notification bar asking you to enable them.
- You can disable macros entirely through Excel settings, or allow them only in specific folders you designate as trusted.
- If you see a notification bar asking to enable macros in a file you did not expect to contain them, it is safer to click "Don't Enable" unless you know the file came from a trusted source.
- Disabling macros does not delete them from the file — it just prevents them from running automatically.
How to disable macros in Excel on Windows
Open Excel and go to File in the top left corner. Click Options at the bottom of the menu. In the Options window, click Trust Center on the left side, then click the Trust Center Settings button.
In the Trust Center window, click Macro Settings on the left. You will see four options. The safest choice is Disable all macros without notification — this blocks all macros and does not show you a notification bar. If you want to be asked each time, choose Disable all macros with notification instead. Click OK twice to save your changes.
These settings explore to all Excel files you open going forward. If you later receive a file that needs macros to work, you can temporarily enable them by clicking the notification bar that appears when you open the file.
How to disable macros in Excel on Mac
Open Excel and click Excel in the top menu bar (next to the Apple logo). Click Preferences. In the Preferences window, find and click Security.
Under the Macro Security section, you will see options for macro handling. Click the radio button next to Disable all macros without notification to block macros completely, or Disable all macros with notification if you want to be asked each time. Close the Preferences window — your changes save automatically.
Allowing macros only in files you trust
If you work with macros regularly and want to keep them enabled for certain files, you can create a trusted location — a folder where Excel automatically allows macros to run without asking. Files in other folders will still have macros disabled.
On Windows, go to File > Options > Trust Center > Trust Center Settings > Trusted Locations. Click Add New Location, then browse to the folder where you keep files you trust. Check the box that says Subfolders of this location are also trusted if you want macros enabled in subfolders too. Click OK twice.
On Mac, go to Excel > Preferences > Security > Trusted Locations. Click the + button, browse to your trusted folder, and click Open. Close Preferences when you are done.
What happens when you disable macros
When macros are disabled, Excel does not run them automatically. If a file contains a macro that is supposed to do something when you open it, that action will not happen. You will still be able to see and edit the spreadsheet data itself — disabling macros only stops the automated code from running.
If you open a file with disabled macros and see a yellow notification bar at the top saying "Macros have been disabled," you can click Enable Content to allow them to run. Only do this if you trust the file and know why it contains macros. If you are not sure, leave them disabled.
How to check if a file contains macros before opening it
Excel files that contain macros have a different file extension: .xlsm instead of .xlsx. The "m" stands for macro. If you see a file ending in .xlsm, it contains macros. Files ending in .xlsx do not.
You can also check after opening a file. On Windows, go to File > Info and look for a section called Inspect Document or Check for Issues. On Mac, go to Tools > Protect Sheet or look in the Review tab. These tools can show you whether macros are present, though they do not show you what the macros do.
When you might need to re-enable macros
If you disable macros globally but later receive a file from a trusted source that needs them to work, you do not have to change your settings. straightforward open the file, and when you see the notification bar asking whether to enable macros, click Enable Content. The macros will run for that file only — your global setting stays the same.
If you find yourself enabling macros in the same file repeatedly, that is a sign you should either add that file's folder to your trusted locations, or change your global macro setting. But for occasional files, the notification bar method is the safest approach.
Frequently Asked Questions
Will disabling macros break my spreadsheet?
No. Disabling macros only stops the automated code from running. Your data, formulas, and charts will all work normally. The only things that will not work are actions that depend on macros — like buttons that trigger calculations or automated formatting.
Can I disable macros for just one file instead of all files?
Not through settings. But you can open any file and click "Don't Enable" when the notification bar appears, and macros will stay disabled for that file while remaining enabled in others. If you want permanent control per file, use trusted locations instead — put files you trust in a designated folder and disable macros everywhere else.
What if I disable macros and then need them later?
You can re-enable them anytime by going back to the same settings menu and choosing a less restrictive option, or by clicking the notification bar in a specific file. Disabling macros does not delete them — it just prevents them from running automatically.
Is it safe to enable macros if I trust the sender?
Trusting the sender is a good start, but not foolproof. Senders can be hacked, or files can be intercepted. The safest approach is to enable macros only if you know what the macros are supposed to do and why the file needs them. If you are unsure, ask the sender to explain before enabling.