How To Enable Macros In Excel File | Enable Content & Trust Center

Enabling macros in an Excel file is done by clicking Enable Content on the yellow security bar, or permanently via **File > Options > Trust Center > Macro Settings**.

Excel blocks macros from running the moment you open an unfamiliar workbook. That security feature is exactly what keeps malicious code from executing, but it also stops your legitimate automated spreadsheets cold. Figuring out how to enable macros in an Excel file usually starts with the yellow Enable Content button. For deeper control—or when that prompt never appears—you adjust the policy directly in the Trust Center.

How To Enable Macros In Excel File Using The Enable Content Prompt

The fastest route is the yellow security bar that appears between the ribbon and the worksheet grid. Excel shows this prompt when it detects VBA code in a workbook that hasn’t been marked as trusted.

  1. Open the workbook that contains the macros.
  2. If the yellow bar reads SECURITY WARNING — Macros have been disabled, click the Enable Content button.
  3. When the confirmation dialog appears, select Yes to trust the document and run the code.

The yellow bar disappears immediately, and any macro-driven buttons or automated actions begin working on the active sheet. Excel now remembers this document as a Trusted Document and will not prompt you again for it.

Where To Find The Permanent Macro Settings In Trust Center

When the yellow security bar doesn’t appear, or when you want to change how Excel handles all macros globally, the Trust Center is the central control panel. Microsoft’s official macro settings page documents the same path used in current versions of Microsoft 365 and Excel for Windows.

  1. Go to File > Options > Trust Center.
  2. Click Trust Center Settings.
  3. Select Macro Settings from the left menu.
  4. Choose the option that matches your workflow and click OK.

If you have the Developer tab enabled, you can also reach this window faster via Developer > Macro Security.

Setting Effect Best For
Disable all macros without notification Macros are blocked silently. No prompt appears. High-security environments where no macros are permitted.
Disable all macros with notification Macros are blocked, but the yellow security bar appears so you can enable per file. Most users. Balances safety and convenience.
Disable all macros except digitally signed Only macros from a trusted publisher run. Others are blocked silently. Organizations using signed code from verified sources.
Enable all macros All macros run without prompting. Microsoft recommends against this option. Only for testing in a controlled, offline environment.

After changing a setting in Trust Center, close Excel and reopen the workbook to apply the new behavior.

Why The Enable Macros Button Might Be Missing (And How To Fix It)

The Enable Content button disappears when Excel considers the file untrusted at the system level, or when the workbook itself cannot hold macros. Three common fixes resolve most cases.

Unblock The File In Windows

Files downloaded from the internet are often blocked by Windows itself.

  1. Right-click the workbook file and select Properties.
  2. On the General tab, look for the Security section at the bottom.
  3. If you see “This file came from another computer and might be blocked…”, check the Unblock box.
  4. Click Apply and OK, then reopen the file in Excel.

Move The File To A Trusted Location

Excel treats any file inside a Trusted Location as safe and automatically enables macros without prompting.

  1. Open Trust Center Settings (File > Options > Trust Center > Trust Center Settings).
  2. Select Trusted Locations.
  3. Click Add new location.
  4. Browse to the folder containing the workbook and, if needed, enable Subfolders of this location are also trusted.
  5. Click OK to close all dialogs and reopen the workbook.

Check For Organizational Policies

IT-managed computers sometimes block macros through Group Policy or security add-ins. If both Unblock and Trusted Locations fail, the restriction may be enforced at the domain level.

Does The Macro File Type Matter?

Yes. Macros only survive in specific file formats. If you save a macro-enabled workbook as a standard .xlsx file, Excel removes the VBA code entirely with no warning.

  • .xlsm — The standard macro-enabled workbook format for modern Excel.
  • .xlsb — A binary workbook format that supports macros and loads large files faster.
  • .xls — The legacy Excel 97-2003 format. Supports macros but may lack modern features.
  • .xlsx — Does not support macros. Saving a macro-enabled file in this format erases all VBA code.

If you open a file and see the words “Workbook” in the title bar but never see any code or automation, check the file extension. Changing the extension back to .xlsm will not recover lost code—the workbook must be macro-enabled before the code is written.

How To Add The Developer Tab For Faster Access

The Developer tab puts Macro Security, the Visual Basic Editor, and macro recording tools one click away. It is hidden by default in Excel.

  1. Go to File > Options > Customize Ribbon.
  2. Under Main Tabs, check the Developer box.
  3. Click OK.

The Developer tab now appears in the ribbon next to View. From here, Macro Security opens the Trust Center settings directly, and the Macros button lists every macro available in the open workbook.

Problem Likely Cause Action
No yellow bar appears File is blocked by Windows or macros are disabled globally Unblock the file in Properties, or check Macro Settings in Trust Center
Yellow bar appears but macros don’t run Trusted Document cache may be corrupted, or security policy overrides Remove the file from Trusted Documents via Trust Center > Trusted Documents
Enable Content is grayed out Workbook is saved as .xlsx (non-macro format) Save the file as .xlsm, then close and reopen
Setting changes don’t stick Restricted by Group Policy or add-ins Contact IT support to check organizational macro policies
Macros work on my PC but not on another Trusted Document status is local to each machine Use Trusted Location or a digital signature for distribution

The Safe Workflow To Enable Macros In Excel

A single checklist covers nearly every situation where macros fail to run. Walk through these steps in order.

  1. Verify the file extension ends with .xlsm or .xlsb. Rename or resave if it is .xlsx.
  2. Right-click the file in Windows Explorer, open Properties, and select Unblock if the option exists.
  3. Open the file in Excel. Click Enable Content on the yellow security bar if it appears.
  4. If the bar does not appear, go to File > Options > Trust Center > Trust Center Settings > Macro Settings and select Disable all macros with notification.
  5. Close Excel, reopen the file, and click Enable Content when prompted.
  6. If macros are still blocked, move the file into a Trusted Location via Trust Center Settings.

On Mac machines, the path is different. Go to Excel > Preferences > Security and set macro security to the middle option, Disable all macros with notification. The Trusted Documents feature available on Windows does not exist on Mac.

References & Sources

Please use a real email you check. If it's fake or mistyped, your message won't reach us and we can't reply — wrong addresses are rejected automatically.