About Macro Security in Excel

Macros can cause serious damage to your computer. It can erase files or install malware. Microsoft has added macro-security features to help prevent your working devices (computer or smartphones) from macro-related problems.

This article is part of my series: Excel VBA & Macros – A Step by Step Complete Guide.

Macro Security in Excel

The following figure shows the Macro Settings section of the Trust Center dialog box. Choose Developer ➪ Code ➪ Macro Security, to display the Trust Center dialog box.

About Macro Security in Excel

The Macro Settings section of the Trust Center dialog box.

By default, Excel uses the Disable All Macros with Notification option. When this setting is selected, if you open a workbook that contains macros (and the file is not digitally “signed”), the macros will be disabled, and Excel will display a Security Warning above the Formula bar.

About Macro Security in Excel

Excel displays a Security Warning if a workbook contains macros.

If you are sure that the workbook comes from a trusted source, click the Enable Content button in the security warning area. The macros, in the workbook, will be enabled. Excel will remember your decision. After enabling the macros, the next time you open that file, you will not see the Security Warning.

Note: If the Visual Basic (VB) Editor window is open when you open a workbook that contains VBA macros, Excel does not display the Security Warning above the Formula bar. Instead, it displays a dialog box with two buttons: Enable Macros and Disable Macros.

You may prefer to designate one or more folders as “trusted locations”, rather than deal with individual workbooks. All the workbooks in a trusted location are opened without a macro warning. You can designate trusted folders in the Trusted Locations section of the Trust Center dialog box, shown in the following figure.

About Macro Security in Excel

Trusted locations in the Trust Center dialog box.

Download Working File

This file contains VBA macro. When you will open it, it will show a Security Warning.

Huis-3D-Excel-Pendulum.xlsm

Happy Excelling 🙂

Read More…

Copy your macros to a Personal Macro Workbook

Top Excel Security Tips: Features for securing worksheets and workbooks


Hello! Welcome to my Excel blog! I am conducting deep dives into the world of Excel. Please join with me and explore Excel deeply. Keep in mind this African proverb: "If you want to go fast, go alone, If you want to go far, go together." Let's together explore Excel deeply! ☕

We will be happy to hear your thoughts

      Leave a reply