How to Enable and Disable Macros in Excel (Beginner-Friendly Guide)

Excel Macros
Aug 27, 2025 6 min read
Enable and Disable Macros in Excel

Macros in Excel can save you hours by automating repetitive tasks—but they can also be risky if used carelessly. In this guide, I’ll show you step-by-step how to enable and disable macros safely, plus the best practices you should follow.

If you’ve ever opened an Excel workbook and seen a warning that says “Macros have been disabled”, you probably paused for a moment. Should you enable macros? Should you leave them off? Is there a risk?

Don’t worry, you’re not alone—I’ve been there too. In this guide, I’ll walk you step by step through how to enable macros in Excel, how to disable macros in Excel, what macro settings really mean, and some safety tips that will help you use them without fear.

By the time you finish this guide, you’ll feel comfortable using macros and ready to automate your boring Excel work.

What Are Macros in Excel?

Macros are basically small programs or instructions inside Excel that automate repetitive tasks.

For example:

  • Want your report to format with one click instead of 20 manual steps? Create a macro.
  • Imagine having to do the same calculation over hundreds of rows—yes, a nightmare without macros. A macro can do it.

Technically, macros are written in VBA (Visual Basic for Applications), but the good news is—even if you don’t write code, you can still record and run macros using Excel’s built-in recorder.

Important Notice

But here’s the catch: because macros can run code, they also come with a security concern. Because macros can execute behind-the-scenes commands, a poorly designed or malicious one could put your data at risk. That’s why Excel macro security settings block them by default until you decide whether to trust the file.

Why Excel Disables Macros by Default

You might wonder—if macros are so useful, why won’t Excel just keep them enabled?

The answer is security. A malicious macro can:

  • Delete or corrupt your files.
  • Steal data.
  • Run harmful commands on your system.

To prevent this, Excel shows you a warning whenever you open a file containing macros. Thankfully, Excel leaves the final decision to you—you’re always in charge of when to allow macros. You can enable macros in Excel for trusted files and disable macros in Excel for unknown or risky ones.

How to Enable Macros in Excel

Here comes the practical part. There are three main ways to enable macros in Excel depending on your workflow.

1. Enable Macros When Opening a File

This is the most common scenario.

When you open a macro-enabled Excel file (usually with extension .xlsm or .xlsb), you’ll see a yellow bar below the ribbon that says: “Security Warning: Macros have been disabled.”

To enable macros in Excel for that file:

  1. Just hit the Enable Content button on that yellow warning bar, and you’re good to go.
  2. That’s it—the macros are now active.

✔️ Use case: This method is perfect if you only occasionally work with macro files and want control each time.

Enable Macros When Opening a File

2. Change Global Macro Settings

If you regularly use macros and don’t want to press “Enable Content” every single time, you can adjust the macro settings in Excel through the Trust Center.

Steps:

  1. Open Excel and click File > Options.
  2. On the left menu, you’ll notice an option called Trust Center—that’s where all the macro settings live.
  3. Click Trust Center Settings.
  4. Select Macro Settings.

Here you’ll see four options:

  1. Disable all macros without notification – Excel completely blocks macros (not recommended for regular macro users).
  2. Disable all macros with notification – You’ll get the yellow bar so you can choose (recommended for safety).
  3. Choose ‘Disable all macros except digitally signed macros’ if you only want to allow macros from certified and trusted publishers.
  4. Enable all macros (not recommended) – Turns on all macros, but dangerous if you open files from others.
  5. Personally, I recommend keeping it on “Disable with notification”. It balances safety with flexibility.
Change Global Macro Settings

3. Enable Macros Automatically from Trusted Locations

If you have specific folders where all your safe macro files are stored (like templates, automation sheets, or reports), you don’t need to enable macros every time.

You can mark that folder as a Trusted Location.

Steps:

  1. Click on File, choose Options, and from the list on the left, select Trust Center where Excel keeps all its security settings.
  2. Click Trusted Locations.
  3. Add the folder path where you keep your macro-enabled files.

From this point on, Excel will automatically allow macros to run in any file that you save inside that folder.

Macros Automatically from Trusted Locations

How to Disable Macros in Excel

Now let’s say you earlier enabled macros, but later thought, “Maybe I shouldn’t trust this file.” Or maybe you just want to turn them off completely.

Here’s how you disable macros in Excel:

  1. To disable macros, go into Excel’s settings. Start by clicking File, then Options, then select Trust Center from the menu on the left. Finally, open the Trust Center Settings button to adjust your macro preferences.
  2. Select Macro Settings.
  3. Choose Disable all macros without notification.

Now macros in all Excel files are disabled until you change the setting again.

Disable Macros in Excel
Pro Tip:

If you just want to stop macros in a single file, simply close Excel and reopen the file but do not click “Enable Content.”

Enabling Macros in Microsoft 365 (Excel Online & Desktop)

If you’re using Excel through Microsoft 365, the steps are essentially the same. The only difference is that Microsoft 365 sometimes blocks macros even more aggressively if the file comes from the internet (like from an email attachment or a download).

To enable macros in Excel 365 for these files:

  1. Right-click the file in File Explorer.
  2. Select Properties.
  3. At the bottom, check the box Unblock (if you see it).
  4. Open the file and click Enable Content.
Macros Automatically from Trusted Locations

Best Practices for Safe Macro Usage

Before enabling the macros easily everywhere, keep these tips in mind:

  1. Trust the source. If the file came from a coworker or system you know, it’s fine. If it’s from an unknown email, don’t enable.
  2. Keep backups. If a macro misbehaves, you can restore your original file.
  3. Use Trusted Locations. Keeps daily workflows quick and safe.
  4. Learn the basics of VBA. Even a little VBA knowledge lets you quickly peek at what a macro does before running it.
  5. Avoid “Enable all macros.” It’s convenient, but risky.

Example: Enabling vs Disabling at Work

Let me give you a practical scenario.

At my work, I have a monthly sales tracker with macros that clean raw data and create neat reports. Since I built those macros myself, I added my “Reports” folder as a Trusted Location. Now, every time I open the file, macros run instantly and save me 30 minutes of work each month.

But last month, I received a random Excel file from a supplier that insisted I should enable macros. I didn’t know what was inside, so I left it disabled. That’s the simple rule I follow, and it has kept me safe for years.

Final Thoughts

Macros in Excel are amazing—they turn boring tasks into one-click magic. But with great power comes responsibility. That’s why Microsoft disables them by default.

Now, you’ve learned:

  • How to enable macros in Excel safely.
  • How to disable macros in Excel just in few clicks are per your requirements.
  • How to adjust macro settings in Excel.
  • Tricks like Trusted Locations and how to handle macros in Microsoft 365.

So next time you see that security warning, you’ll know exactly what to do. Enable if you trust it, disable if you don’t—and enjoy making Excel work harder for you.

Comments (0)

Leave a Comment

Comments are moderated before publishing.

No comments yet. Be the first to comment!

Quick Tip

Use Ctrl+T to convert your data range into a formatted table instantly.