Enabling macros in Microsoft Excel allows you to automate repetitive and complex tasks, enhancing your productivity. However, since macros can pose security risks by potentially containing malicious code, Excel disables them by default. This guide explains how to enable macros safely in Excel, whether for individual files, all workbooks, or specific trusted locations.

Enable macros on individual files

You can enable macros for specific Excel documents using the message bar or through the backstage view.

Enable macros from the message bar

When you open an Excel file that contains macros, a yellow message bar appears below the ribbon indicating that macros have been disabled.

Step 1: In the yellow message bar that appears below the ribbon, click the 'Enable Content' button to activate the macros in the current document.

Enable macros in the backstage view

If the message bar is not visible, you can enable macros through the backstage view.

Step 1: Click on the 'File' tab to access the backstage view.

Step 2: In the 'Info' section, you'll notice a yellow 'Security Warning' indicating that macros have been disabled.

Step 3: Click on 'Enable Content' and then choose 'Enable All Content' to allow macros to run in the document.

Once macros are enabled, Excel designates the document as trusted, so you won't receive security warnings for it in the future.

Enable macros for one session

If you prefer to enable macros temporarily without designating the file as trusted, you can enable them for the current session only.

Step 1: Click on the 'File' tab to open the backstage view.

Step 2: In the 'Info' section, locate the yellow 'Security Warning' and click on 'Enable Content', then select 'Advanced Options'.

Step 3: In the 'Microsoft Office Security Options' dialog box, select 'Enable content for this session' and click 'OK'.

Macros will now run in the document for the current session. The next time you open the file, macros will be disabled again unless you repeat these steps.

Enable macros in all workbooks

If you frequently work with macros and want to enable them in all Excel workbooks by default, you can adjust your Trust Center settings. Be cautious with this option, as it can expose your system to security risks from malicious macros.

Step 1: Click on the 'File' tab and select 'Options' from the left sidebar.

Step 2: In the 'Excel Options' dialog box, click on 'Trust Center' in the left pane, then click the 'Trust Center Settings' button on the right.

Step 3: In the 'Trust Center' dialog box, select 'Macro Settings' from the left sidebar. On the right, you'll see four macro settings options.

The four macro settings are:

  • Disable all macros without notification: Blocks all macros without providing any alerts.
  • Disable all macros with notification: The default setting; macros are disabled, but you receive notifications with the option to enable them.
  • Disable all macros except digitally signed macros: Disables macros, except those with a trusted digital signature.
  • Enable all macros: Allows all macros to run without warnings, which can pose significant security risks.

Step 4: To enable all macros by default, select 'Enable all macros'. Click 'OK' to save the changes.

With this setting enabled, all macros in any workbook will run automatically without prompts. To revert this change, return to the macro settings and select a different option.

Enable macros in trusted locations

You can designate specific folders as trusted locations, allowing Excel to run macros in any files stored there without security warnings. This method provides a balance between convenience and security.

Step 1: Click on the 'File' tab and select 'Options'.

Step 2: In the 'Excel Options' dialog box, choose 'Trust Center' from the left pane and click on 'Trust Center Settings'.

Step 3: Select 'Trusted Locations' in the Trust Center. You'll see a list of existing trusted locations.

Step 4: To add a new trusted location, click on 'Add new location'.

Step 5: In the 'Microsoft Office Trusted Location' dialog box, click 'Browse' and select the folder you want to trust. If you want Excel to trust all subfolders within this location, check the box labeled 'Subfolders of this location are also trusted'. Optionally, add a description for the trusted location. Click 'OK' to confirm.

Step 6: The new trusted location will now appear in the list. Click 'OK' to close the Trust Center.

Any macro-enabled files saved in this trusted location will run macros without any security warnings. Be cautious when adding network locations as trusted, as this can increase the risk of running malicious macros.

Remove trusted documents

If you have previously trusted documents but now want to ensure that macros do not run automatically, you can clear your list of trusted documents.

Step 1: Click on the 'File' tab and select 'Options'.

Step 2: In the 'Excel Options' dialog box, choose 'Trust Center' and click on 'Trust Center Settings'.

Step 3: Select 'Trusted Documents' from the left sidebar.

Step 4: Click on the 'Clear' button to remove all trusted documents.

Step 5: Confirm the action by clicking 'Yes' in the pop-up dialog.

After clearing trusted documents, Excel will no longer automatically allow macros, ActiveX controls, or other active content in previously trusted files.


By understanding how to enable macros safely in Excel, you can automate tasks effectively while maintaining your system's security. Always ensure that you trust the source of any macros before enabling them.