How to Enable Macros in Excel: 3 Easy Methods (2025 Guide)

Updated: January 20258 min read

Quick Answer: To enable macros in Excel, click the yellow security warning bar and select "Enable Content". For permanent settings, go to File → Options → Trust Center → Trust Center Settings → Macro Settings.

Why Enable Macros in Excel?

Macros are automated sequences of actions in Excel that save time and reduce errors. When you open a file containing macros, Excel disables them by default for security reasons. You need to manually enable macros to use automation features.

Common Uses for Macros:

  • Automate repetitive tasks (formatting, data entry, calculations)
  • Create custom functions and formulas
  • Build interactive dashboards and reports
  • Process large datasets efficiently

Learn more about how to create macros in Excel.

Security Warning: When to Enable Macros

Important Security Notice

Only enable macros from trusted sources. Malicious macros can harm your computer, steal data, or install viruses. Excel disables macros by default to protect you.

Signs of Malicious Macros:

  • Files from unknown senders or suspicious emails
  • Unexpected macro-enabled files (.xlsm) when you expected a regular file (.xlsx)
  • Files that urgently request you to enable macros

Best Practices:

  • Only enable macros in files you created or from trusted colleagues
  • Keep your antivirus software updated
  • Use "Disable all macros with notification" setting (recommended)

Method 1: Enable Macros for Current File (Easiest)

This is the quickest method and works for individual files. When you open a macro-enabled file, Excel shows a yellow security warning bar below the ribbon.

Step-by-Step Instructions:

  1. 1

    Open your macro-enabled file (.xlsm)

    You'll see a yellow security warning bar below the ribbon

  2. 2

    Click "Enable Content" button

    The warning bar will disappear and macros will be enabled

  3. 3

    Macros are now active

    You can now run macros in this file

Note: This method only enables macros for the current session. You'll need to click "Enable Content" again next time you open the file.

Method 2: Change Macro Security Settings (Permanent)

Change Excel's global macro security settings to control how macros are handled in all files. This is done through the Trust Center.

Step-by-Step Instructions:

  1. 1

    Open Excel and click "File" in the top menu

  2. 2

    Click "Options" at the bottom of the left sidebar

  3. 3

    Select "Trust Center" from the left menu

  4. 4

    Click "Trust Center Settings" button

  5. 5

    Click "Macro Settings" in the left menu

  6. 6

    Choose your preferred setting (see options below)

  7. 7

    Click "OK" twice to save changes

Macro Security Options Explained:

❌ Disable all macros without notification

All macros are disabled. No security warning. Use only if you never use macros.

✅ Disable all macros with notification (RECOMMENDED)

Macros are disabled, but you see a security warning. You can enable them for trusted files. Best balance of security and usability.

⚠️ Disable all macros except digitally signed macros

Only macros from trusted publishers run automatically. Others are disabled with notification.

❌ Enable all macros (NOT RECOMMENDED)

All macros run automatically without warning. Dangerous! Only use in controlled environments.

Method 3: Add Trusted Locations (Most Convenient)

Trusted Locations are folders where Excel automatically enables macros without security warnings. This is perfect for folders containing your own macro files.

Step-by-Step Instructions:

  1. 1

    Follow steps 1-4 from Method 2 to open Trust Center Settings

  2. 2

    Click "Trusted Locations" in the left menu

  3. 3

    Click "Add new location" button

  4. 4

    Click "Browse" and select your folder

  5. 5

    Check "Subfolders of this location are also trusted" (optional)

  6. 6

    Click "OK" three times to save

How to Enable the Developer Tab in Excel

The Developer Tab gives you access to VBA tools, macro recording, and form controls. Here's how to enable it:

Step-by-Step Instructions:

  1. 1

    Click "File" in the Excel ribbon

  2. 2

    Click "Options" at the bottom

  3. 3

    Select "Customize Ribbon" from the left menu

  4. 4

    In the right panel, check the "Developer" checkbox

  5. 5

    Click "OK"

What's in the Developer Tab?

  • Visual Basic: Opens the VBA Editor (Alt+F11)
  • Macros: View, run, and manage your macros
  • Record Macro: Record your actions as a macro
  • Form Controls: Add buttons, checkboxes, and other controls

Frequently Asked Questions

Why are my macros disabled in Excel?

Excel disables macros by default for security reasons. Macros can contain malicious code that could harm your computer or steal data. You need to manually enable macros for each file or change your Trust Center settings to allow macros from trusted sources.

Is it safe to enable macros in Excel?

It's safe to enable macros only if the file comes from a trusted source. Only enable macros in files you created yourself or received from trusted colleagues. Never enable macros in files from unknown senders or suspicious emails, as they may contain viruses or malware.

How do I permanently enable macros in Excel?

To permanently enable macros, go to File → Options → Trust Center → Trust Center Settings → Macro Settings. Select "Disable all macros with notification" (recommended) or add specific folders as Trusted Locations. Note: Enabling all macros without notification is not recommended for security reasons.

Can I enable macros in Excel Online?

No, Excel Online (web version) does not support VBA macros. Macros only work in the desktop versions of Excel (Excel 2016, 2019, 365). You need to download the file and open it in desktop Excel to run macros.

What file format supports macros in Excel?

Macro-enabled Excel files use the .xlsm extension (Excel Macro-Enabled Workbook). Regular .xlsx files cannot contain macros. Older Excel files (.xls) and binary workbooks (.xlsb) also support macros.

How do I know if an Excel file has macros?

Check the file extension - .xlsm files contain macros. When you open a file with macros, Excel shows a yellow security warning bar below the ribbon. You can also press Alt+F11 to open the VBA Editor and check if there's any code in the modules.

Can Excel macros contain viruses?

Yes, macros can contain malicious code including viruses, ransomware, and data-stealing scripts. This is why Excel disables macros by default. Always scan files with antivirus software and only enable macros from trusted sources. Keep your antivirus software updated.

How do I disable macros again in Excel?

To disable macros, go to File → Options → Trust Center → Trust Center Settings → Macro Settings and select "Disable all macros without notification" or "Disable all macros with notification". Close and reopen Excel for changes to take effect.

Need Help Creating VBA Macros?

Our AI-powered VBA Code Generator creates working macros from plain English descriptions. No coding knowledge required!

✓ No credit card required ✓ 5 free generations ✓ Instant results

Related Articles