How to Enable Macros in Excel on Mac

Last updated on November 9th, 2026 at 01:39 pm

To enable macros in Excel on a Mac, open the workbook and click Enable Macros when Excel asks. If you don’t see that prompt, go to Excel > Settings > Security (called Preferences in older versions) and set Macro Security to Disable VBA macros with notification. Excel will then ask each time you open a file with macros, so you can allow the ones you trust. These steps apply to Excel for Microsoft 365 for Mac, Excel 2024, 2021 and 2019.

How to enable macros in Excel for Mac
Allow macros one file at a time, not for everything. Drawing based on Excel for Mac, not a screenshot.

Enable macros for one file

  1. Open the workbook (.xlsm, .xlsb or .xlam).
  2. When the alert warns that the workbook contains macros, click Enable Macros.
  3. Run the macro from Tools > Macro > Macros, or the button the file provides.

Click Disable Macros if you weren’t expecting a macro or don’t know who made the file. The workbook still opens, just without the code.

Change the macro security setting

  1. Open Excel and choose Excel > Settings from the menu bar.
  2. In the Sharing and Privacy row, click Security & Privacy (or Security in some versions).
  3. Pick a Macro Security option and close the window.
OptionWhat happensUse it when
Disable all macros without notificationMacros never run and you aren’t askedYou never use macros
Disable VBA macros with notificationExcel asks each timeRecommended for most people
Disable VBA macros except digitally signed macrosOnly signed macros from trusted publishers runYour company signs its macros
Enable all VBA macros (not recommended)Every macro runs without askingAvoid. Any file could run harmful code

Leave Trust access to the VBA project object model off unless an add-in you trust asks for it.

Show the Developer tab

The Developer tab has the Visual Basic editor, Record Macro and Macros buttons.

  1. Go to Excel > Settings > Ribbon & Toolbar.
  2. Under Customize the Ribbon, tick Developer.
  3. Click Save.

With the tab showing, you can record a macro of your own or run an existing macro.

Save files with macros

A regular .xlsx file can’t store macros. When you save a workbook that contains VBA, choose Excel Macro-Enabled Workbook (.xlsm) in the File Format list. If you save as .xlsx, Excel warns you and strips the code.

Do macros work in Excel for the web or on iPad?

No. VBA macros only run in the desktop apps for Mac and Windows. The web and iPad versions open .xlsm files but can’t run the code.

Mac vs Windows differences

MacWindows
Where the setting isExcel > Settings > SecurityFile > Options > Trust Center
Trusted LocationsNot availableAvailable
ActiveX controlsNot supportedSupported
Windows API calls in VBADon’t workWork

Some macros written on Windows won’t run on a Mac even when enabled, especially ones that use ActiveX controls, Windows file paths with backslashes, or Windows API calls. You’ll see a compile or run-time error in that case, and the macro needs editing for Mac. On a Windows PC, follow enabling macros in Excel for Office 365 instead.

No macro prompt or macros disabled

No Enable Macros prompt appears

Macro Security is set to Disable all macros without notification. Change it to with notification, then close and reopen the file.

“Macros in this project are disabled”

The file was opened with macros off. Close it, check the security setting, reopen it and click Enable Macros.

The macro runs but nothing happens

The macro may need permission to access files. macOS can ask Excel for access to folders such as Documents or Desktop the first time. Click Grant Access when prompted, or check System Settings > Privacy & Security > Files and Folders.

Stay safe with macros

  • Only enable macros in files from people or companies you trust and were expecting.
  • Be suspicious of email attachments that tell you to “enable content” to see a document.
  • Keep Excel updated through Help > Check for Updates.
  • Remove the macros from any file whose code you no longer need.