How to Enable Macros in Excel (and when you should not)

By Srini Vanamala / September 29, 2026 / Macros & VBA
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:

  1. Right-click the file in File Explorer › Properties.
  2. At the bottom of the General tab, tick Unblock.
  3. Click OK and reopen the file.

Change the setting for all files

  1. File › Options › Trust Center › Trust Center Settings.
  2. Click Macro Settings.
  3. 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).

← →
Srini Vanamala

20 years with spreadsheets and enterprise systems. Writes one short, plain-English Excel lesson a day. Got an Excel question? learnexceleasycom@gmail.com

Have a question about this lesson?

Ask anything — I read every comment. Your email is never shown.