Excel macro security

Excel macro security is protection against viruses that can enter your computer along with macros. Macro security has changed significantly since the release of Excel 2003, so in this topic, the features of old and new versions of Excel will be considered separately:

Macro security in modern versions of Excel (2007 and newer)

To run a macro in modern versions of Excel, the file must be saved as a macro-enabled Excel workbook. When opening such a file, by its extension xlsm Excel understands that this workbook contains macros (as opposed to a file with the standard extension xLSX).

Therefore, in order to be able to run a macro created in a regular Excel workbook anytime and anywhere, you need to save it with the extension xlsm… To do this, on the tab File (Filet) knead Save as (Save as) and in the field File Type (Save as type) select Macro-enabled Excel workbook (Excel Macro-Enabled Workbook).

The difference in the file type clearly indicates that the workbook contains macros, and this is already an important first step to comply with security measures. In addition, there are several macro security modes in Excel, one of which can be selected from the application options menu. These are the modes:

  1. Disable all macros without notice (Disable all macros without notification) When you open a workbook, Excel does not notify you that the workbook contains macros, so the user may not understand why an Excel workbook is not working as it should.
  2. Disable all macros with notification (Disable all macros with notification) However, if there is a macro in the workbook, a warning will appear stating that the macro is present but disabled.
  3. Disable all macros without digital signatures (Disable all macros except digitally signed macros) Only macros from trusted sources are allowed to run. All other macros will not be executed. When you open a workbook, Excel does not notify you that the workbook contains macros, so the user may not understand why an Excel workbook is not working as it should.
  4. Enable all macros (Enable all macros) All macros are allowed to run. When you open an Excel workbook, there is no notification that it contains macros. Accordingly, the user may not know that any macro is being executed while the file is open.

Option Disable all macros with notification – allows you to make a choice when opening a file: allow macros to run or disable them. In this case, a yellow bar with a notification and a button appears at the top of the sheet, as shown in the figure below:

To enable the execution of macros, you just need to click on the button Enable content (Enable Content).

Where to find macro security settings in Excel

Here’s how you can view or change macro security settings in Excel 2007, 2010, or 2013:

Excel 2007

  • Open the Excel main menu by clicking on the big round button Office in the upper left corner. Next click Excel options (Excel Options).
  • In the dialog box that appears, select Security Control Center (Trust Center) and press the button Trust Center Settings (Trust Center Settings).
  • In section Macro options (Macro Settings) select the desired option and press OK.

Excel 2010 or 2013

  • On the Advanced tab File (Filet) knead Parameters (Options).
  • In the dialog box that opens, select Security Control Center (Trust Center) and press the button Trust Center Settings (Trust Center Settings).
  • In section macro optionsowls (Macro Settings) select the desired option and press OK.

Note: You will need to restart Excel for the new macro security settings to take effect.

Trusted locations in modern versions of Excel (2007 and newer)

Excel 2007, 2010, and 2013 allow you to declare selected folders on your computer’s hard drive as trusted locations. When you open files stored in these locations, Excel does not perform standard macro security checks. In other words, if you place an Excel file in a folder that is declared safe, then when you open this file, all macros recorded in it will run regardless of the state of the security settings.

Microsoft sets some locations as trusted by default, and a list of them is stored in Excel’s security settings section. You can open the list of trusted locations like this:

Excel 2007

  • Open the Excel main menu by clicking on the big round button Office in the upper left corner. Next click Excel options (Excel Options).
  • In the dialog box that appears, select Security Control Center (Trust Center) and press the button Trust Center Settings (Trust Center Settings).
  • In the menu on the left, click Trusted Locations (Trusted Locations).

Excel 2010 or 2013

  • On the Advanced tab File (Filet) knead Parameters (Options).
  • In the dialog box that opens, select Security Control Center (Trust Center) and press the button Trust Center Settings (Trust Center Settings).
  • In the menu on the left, click Trusted Locations (Trusted Locations).

If you want to save your Excel workbook in a different location and still allow macros to run, you can add the selected folder to the list of trusted locations. It’s done like this:

  • In section Trusted Locations (Trusted Locations) click the button Add new location (Add new location).
  • Select the folder you want to make a trusted location and click OK.

Warning: It is not recommended to add large sections of the hard disk to the list of trusted locations, for example, the entire folder My documents (My Documents), since this significantly increases the risk of executing a macro obtained from an untrusted source.

Macro security in Excel 2003

Microsoft Office 2003 has 4 levels of macro security that can be controlled from the Excel menu. These include:

  1. High / Very highThese two levels only allow macros to be run from trusted sources. All other macros will not run. When you open a workbook, Excel does not notify you that the workbook contains macros, so the user may not understand why an Excel workbook is not working as it should.
  2. AverageIf the book contains macros, then when you open the book, a notification window will appear asking if these macros should be run.
  3. LowAll macros are executed. When you open an Excel workbook, there is no notification that it contains macros. Accordingly, the user may not know that any macro is being executed while the file is open.

If you want to run a macro in Excel 2003, then macro security must be selected Low (Low) or Average (Medium).

To open and configure macro security settings in Excel 2003, you need to:

  • Open the menu Service > Macro > Security (Tools > Macro > Security):Excel macro security
  • Set the desired security level and click OK.

You will need to restart Excel for the new macro security settings to take effect.

Leave a Reply