Macros are special programs written in Excel to meet specific purposes. Macros can be written to automate repetitive tasks or add new features to Excel. Macros are generally useful scripts written in Visual Basic. We frequently utilize macros in our work and use Excel files containing Visual Basic macros.

Such useful macros can also be used as tools of harm. Excel files containing Visual Basic macros can also be used to create viruses that can harm your computer or access your information. The risk is particularly high with files downloaded from the internet and from unknown sources. Therefore, when opening a file containing macros, Excel asks the user for permission to enable macros.

Sometimes, when opening an Excel file, we see a warning above the formula bar, like the one below, to enable content and macros. Sometimes, the warning may not appear. This could be because Excel remembers a file you previously trusted, or because your security settings are set to "High."

image

You can choose whether or not to receive this warning through Excel's security settings. To adjust security settings in Excel 2007 and later, follow the steps below, as shown in the images.

In File > Options > Trust Center > Trust Center Settings > Macro Settings we can specify whether to prompt us to enable macros with the "Disable all macros with notification" option or to enable them without prompting with the "Enable all macros" option.

image
image
image
image
image

After following the steps and clicking "OK" to complete the process, we need to completely close Excel and reopen it. The new settings will take effect when Excel reopens.