How to Enable Macros in Excel (and when you should not)
Macros are small programs saved inside a workbook. Excel blocks them by default because a macro can do anything — including damage. Enable them only for files you trust.
Enable macros for one file (safest)
Open the file. A yellow bar appears under the ribbon: SECURITY WARNING — Macros have been disabled. Click Enable Content. Macros run for this file only.
If the bar says “blocked” in red
Files downloaded from the internet get an extra block. Close Excel, then:
- Right-click the file in File Explorer › Properties.
- At the bottom of the General tab, tick Unblock.
- Click OK and reopen the file.
Change the setting for all files
- File › Options › Trust Center › Trust Center Settings.
- Click Macro Settings.
- Choose Disable VBA macros with notification (recommended — you get the yellow bar each time) or Enable VBA macros (not recommended).
Trust one folder instead
In Trust Center, open Trusted Locations and add a folder. Any workbook saved there runs macros without asking. Keep only your own files in it.
The file must be .xlsm
A normal .xlsx file cannot hold macros. If you wrote a macro and it vanished after saving, save again as Excel Macro-Enabled Workbook (.xlsm).