How to Enable Macros in Excel 365 (Windows): A Safe 2026 Guide

Macros can turn a 20-minute month-end task into a single button click, but Excel keeps them switched off by default for good reason. This guide shows you exactly how to enable macros in Excel 365 on Windows, three safe ways to do it, and how to tell a genuinely useful automation from a security risk before you click anything.

What macros are and why Excel disables them

A macro is a small program written in VBA (Visual Basic for Applications) that runs inside your workbook. Accountants use them to refresh reports, reformat exports, post journals, or reconcile a bank feed in seconds. Because a macro can do almost anything a person sitting at your PC can do, including deleting files or contacting the internet, Excel treats it as code that must earn your trust.

Two file facts matter here:

How to enable macros in Excel from the security warning bar

This is the fastest method and the one you will use most often. When you open a macro-enabled workbook you trust, a yellow Message Bar appears just below the ribbon reading "SECURITY WARNING Macros have been disabled."

  1. Open the .xlsm file.
  2. Look for the yellow bar under the ribbon.
  3. Click Enable Content.

That's it. The macros are now active for this file, and Excel remembers your choice. The next time you open the same workbook from the same folder, it usually opens as a trusted document without asking again.

If you don't see the bar, the file may contain no macros, or your settings may be set to disable them silently, which the Trust Center section below fixes.

How to activate macros through the Trust Center

Use the Trust Center when you want to set your default behaviour for every workbook, not just the one on screen. This is where you control how Excel handles macros system-wide.

  1. Go to File > Options.
  2. In the left pane, click Trust Center.
  3. Click Trust Center Settings on the right.
  4. Select Macro Settings in the left column.

You'll see four options. In current Excel 365 they read:

For almost everyone, Disable VBA macros with notification is the right choice. It gives you the yellow-bar prompt so you decide file by file. Click OK twice to save. Leave the Enable Excel 4.0 macros checkbox unticked, as that old macro format is a common malware vector.

When the banner is red, not yellow: unblocking downloaded files

Since a 2022 Microsoft security change, macros in files that came from the internet — an email attachment, a download, a shared drive — are blocked more aggressively. Instead of a yellow bar with an Enable Content button, you get a red banner: "SECURITY RISK Microsoft has blocked macros from running because the source of this file is untrusted." There is deliberately no easy enable button.

If, and only if, you trust the file and the sender, you unblock it at the file level:

  1. Close the workbook in Excel.
  2. Open File Explorer and find the file.
  3. Right-click it and choose Properties.
  4. On the General tab, look at the bottom for a security note reading "This file came from another computer..."
  5. Tick the Unblock checkbox, then click OK.
  6. Reopen the file. You'll now get the normal yellow bar, where you can click Enable Content.

If there is no Unblock checkbox, the file has no internet mark and you can use the yellow-bar method directly. Never unblock a file you weren't expecting, even from a familiar name — spoofed senders are common.

Set up a Trusted Location for files you use every day

If you have a folder of workbooks you build and rerun constantly, a Trusted Location lets macros run automatically without a prompt each time. Only ever point this at a folder you control, never at Downloads or a shared network drop-box.

  1. Go to File > Options > Trust Center > Trust Center Settings.
  2. Click Trusted Locations.
  3. Click Add new location.
  4. Click Browse, select your folder, and click OK.
  5. Optionally tick Subfolders of this location are also trusted.
  6. Click OK to save.

Any macro-enabled workbook opened from that folder now runs its macros silently. Keep the list short and specific.

Turn on the Developer tab (to see and record macros)

To view, edit, or record macros, switch on the Developer tab:

  1. Go to File > Options > Customize Ribbon.
  2. In the right-hand list, tick Developer.
  3. Click OK.

You'll now see a Developer tab with the Macros, Record Macro, and Visual Basic buttons.

The security risks, and how to stay safe

Enabling macros is safe when you understand what you're trusting. Malicious macros are one of the oldest tricks in the book precisely because a click feels harmless. Stay on the right side of it:

A safer source of macros than the internet

The riskiest line in any tutorial is the one that says "paste this code and click Enable Content." You can't audit what you can't read, and a single VBA procedure can reach every file on your PC and every site on the internet. The safest macro is one you commissioned yourself and can read line by line before it runs — but most accountants can't write VBA from scratch, which is exactly why people end up copying a stranger's .xlsm in the first place.

Once macros are enabled and the Developer tab is on, an in-Excel assistant like HISAB 360 closes that gap. Instead of hunting for code online, you describe the task in plain English inside the HISAB panel and it writes the VBA for you, in your own workbook, where you can review every line. For example, you might type:

"Add a button to my ribbon that copies today's rows from the Sales sheet into a new dated tab, then saves the file."

HISAB writes a macro like this and installs it behind a custom ribbon button:

Sub ArchiveTodaysSales()
    Dim src As Worksheet, dst As Worksheet
    Set src = ThisWorkbook.Sheets("Sales")
    Set dst = ThisWorkbook.Sheets.Add(After:=src)
    dst.Name = "Sales " & Format(Date, "yyyy-mm-dd")

    src.UsedRange.AutoFilter Field:=1, Criteria1:=Format(Date, "dd/mm/yyyy")
    src.UsedRange.SpecialCells(xlCellTypeVisible).Copy dst.Range("A1")
    src.AutoFilterMode = False

    ThisWorkbook.Save
End Sub

Now the one-click workflow is yours: the code lives in your file, you can read it, edit it, or delete it, and nothing was pasted in from an unknown source. The same approach goes beyond VBA — you can ask HISAB for a Power Query M script to clean an export or a DAX measure for a pivot, all generated from the same plain-English prompt. It's one option among several, but it sidesteps the biggest risk this whole guide is about: running code you can't read.

Frequently asked questions

Why can't my .xlsx file run macros?

The .xlsx format cannot store macros by design. Save the file as Excel Macro-Enabled Workbook (.xlsm) via File > Save As, and choose that type from the dropdown.

I clicked Enable Content but the macros still don't run. Why?

The file is probably internet-blocked with the red banner. Close it, right-click the file in File Explorer, choose Properties, tick Unblock, click OK, then reopen and enable content.

Will enabling macros for one file change my settings for all files?

No. Clicking Enable Content trusts only that document. Your default behaviour is set separately in the Trust Center under Macro Settings.

Is it safe to enable macros?

Yes, when the file comes from a source you trust and you keep the "Disable with notification" default. The danger isn't macros themselves; it's running code from an unknown sender. Verify the source, and when possible use signed or tool-generated macros you didn't have to paste in yourself.

Can I get a macro without finding code online?

Yes. With macros enabled, an in-Excel AI assistant like HISAB 360 generates VBA (and Power Query M or DAX) from a plain-English request and installs it in your own workbook, so you get a working automation you can read and edit rather than a downloaded file you have to trust blind.

Try HISAB 360 on your own workbook

HISAB 360 is an AI assistant inside Excel for accountants and finance teams — it writes macros, Power Query and formulas from plain English, and connects two-way to QuickBooks, Xero, Zoho Books, Odoo, FreshBooks and Sage. The 15-day trial is the full product, no card required.

Start free → See pricing