If Excel macros won't run, it is almost always a trust or security setting blocking them, not a broken file. When you open a workbook with macros, Excel looks for something called the Trust Center. It checks whether the file is in a trusted folder, whether macros of that type are allowed, and whether the file was blocked after download. The longest but most reliable fix is to put the workbook in a trusted location and enable macros for that session. Do this only for files you created or got from a trusted source; never enable macros in a workbook someone sent you unless you know what it does.

What You'll Need

  • A Windows or Mac computer with Microsoft Excel installed (the exact menu names can differ slightly by version, operating system, and region).
  • The workbook that contains the macros, and a clear idea of where it came from.
  • Rights to change Excel's Trust Center settings on your own account. On a work PC or shared computer, those settings may be locked by an administrator, so ask before you change them.

Step-by-Step

  1. Check whether the macros are actually blocked. Open the workbook. If you see a yellow security bar below the ribbon saying macros have been disabled, that is the problem. If there is no warning at all, the file may simply not contain macros (for example, it was saved as a normal .xlsx instead of a macro-enabled .xlsm file). Check the file extension first.
  2. Look at the macro settings. In Excel on Windows, go to File > Options > Trust Center > Trust Center Settings. Open the Macro Settings area. If the setting is "Disable all macros without notification," Excel will never run macros and will never warn you. Change it to "Disable all macros with notification" so Excel asks you instead of silently blocking. On a Mac, use the same File > Options route and the Trust Center area if your version has it; older Mac versions use Excel > Preferences > Security instead.
  3. Try enabling macros for this one file. With "Disable all macros with notification" set, reopen the workbook and click Enable Content in the security bar. This turns macros on for that session only, which is safer than lowering the setting for everything.
  4. Check whether the file came from the internet. Files downloaded from email or the web can be flagged as unsafe even when macros are allowed. In Windows, right-click the file in File Explorer, choose Properties, and look for an Unblock box near the bottom. Tick it, click Apply, then reopen the workbook. Only do this for files you actually trust.
  5. Move trusted workbooks into a trusted location. In Trust Center Settings, open Trusted Locations and use Add new location to point at a folder you control, such as a subfolder for your own macro workbooks. Any file saved there runs its macros without a prompt. Do not add broad folders such as your entire Downloads folder or Documents; pick a narrow, specific folder.
  6. Confirm the file format. Macros need a macro-enabled format. If macros were saved into an .xlsx file, they were stripped out when it was saved, not blocked. Open the workbook, use File > Save As, and choose Excel Macro-Enabled Workbook (.xlsm). This will not restore macros that were already lost, but it prevents the same thing from happening again.
  7. Test in a safe way. Run a single, simple macro first, such as one that just formats a cell. If it works, the block was the issue; if it errors, the problem is in the code, not in Excel's security.

Common Mistakes

  • Turning off all security the moment a macro fails. Choosing "Enable all macros" trusts every file, including ones from strangers. Macros can run harmful code, so keep the setting on "with notification" and enable per file.
  • Trusting the whole Downloads folder. A trusted location skips the prompt for everything inside it. That defeats the point if the folder receives random files from the web.
  • Saving work as .xlsx. Macros quietly disappear on save because that format cannot store code. Always use .xlsm for workbooks that need macros.
  • Assuming a warning-free file worked. "Disable all macros without notification" gives you no warning and no error, which looks like a bug. Check the setting rather than guessing.
  • Ignoring administrator restrictions. On a managed Windows computer, Trust Center options can be greyed out or reset by policy. Changing them locally then does nothing.

Tips

  • Keep a dedicated folder for your own macro workbooks and mark that folder as the only trusted location.
  • When sharing a workbook, ask people to enable the content themselves rather than telling them to change their security settings.
  • If you develop your own macros, consider signing your code project digitally so trusted users see a known publisher. That is optional for personal use.
  • Save a copy of important workbooks before experimenting with new macros, so a run that goes wrong does not destroy real data.
  • If macros run on one computer but not another, compare the Trust Center macro settings and trusted location lists on both machines; they are stored per computer, not inside the file.

Troubleshooting

The macro runs but gives an error. Open the editor with Alt+F11 on Windows, or use Tools > Macro > Macros in newer Mac versions to view code. A runtime error message usually points at the failing line. This is a code problem, not a security block.

The buttons do nothing. A form button may be assigned to a macro that no longer exists, or was removed when the file was saved in the wrong format. Recheck that the file is .xlsm and that the macro still appears in the macro list.

Nothing works and no warnings appear. Recheck the Macro Settings area and look for a line saying the settings are controlled by the system administrator. If so, only your IT administrator can lift the restriction.

The file will not open at all. Close and reopen Excel, then restart the computer. If the workbook still fails, open it in another Excel version or ask the file's owner to resend it in a macro-enabled format. If a file behaves strangely after you enabled macros, close it without saving and scan it before trying again.

Frequently Asked Questions

Why does Excel say macros are disabled when I know the file has macros?

Usually the Trust Center setting is set to disable macros without notification, or the file has been marked as coming from the internet. Check Macro Settings and, on Windows, the Unblock box in the file's Properties.

Do I need to enable macros every time I open the file?

Only if the file is outside a trusted location. Files in a trusted location run without a prompt.

Can I run macros on Excel for the web?

No. Macros need the desktop Excel app; the browser version does not run them.

Will enabling macros harm my computer?

Macros are real code and can do real damage if they come from someone untrustworthy. Enable them only in files you created or received from a source you trust.

Why did my macros vanish after I saved?

The workbook was saved as .xlsx, which cannot hold macro code. Save macro workbooks as .xlsm.

Can I turn off macro security permanently?

You can enable all macros in settings, but it is not recommended because it trusts every file. Enable per file, or trust a narrow folder.