It’s possible for unscrupulous programmers to write viruses and
other harmful programs by using the Microsoft Visual Basic for
Applications (VBA) programming language, so you need to be sure that you
don’t run macros from unknown sources. In addition to running protective
software such as Windows Defender, you can also change your Excel macro
security settings to control when macros can be run. After you’re sure a
macro is safe, you open it in the Visual Basic Editor to examine its
code.
Macro Security in Excel 2010
In versions of Excel prior to Excel 2007, you could define macro
security levels to determine which macros, if any, your workbooks
would be allowed to run, but there was no workbook type in which all
macros were disallowed. Excel 2010 has several file types you can use
to control whether a workbook will allow macros to be run. The
following table summarizes the macro-related file types.
When you open a macro-enabled workbook, the Excel
program-level security settings might prevent the workbook from
running the macro code. When that happens, Excel displays a security
warning on the Message Bar.
Troubleshooting
The appearance of buttons and groups on the ribbon changes
depending on the width of the program window.
Clicking the Enable Content button lets the workbook use its
macros. Always take the time to verify the workbook’s source and
consider whether you expected the workbook to contain macros before
you enable the content. If you decide not to enable the macros in a
workbook, click the Close button at the right edge of the Message
Bar.
You can change your program-level security settings to make them
more or less restrictive; to do so, click the File tab, click Options,
and then, in the Excel Options dialog box, click the Trust Center
category. On the page that appears, click the Trust Center Settings
button to display the Trust Center dialog box.
The Excel default macro security level is Disable All
Macros With Notification, which means that Excel displays a warning on
the Message Bar but allows you to enable the macros manually.
Selecting the Disable All Macros Without Notification option does
exactly what the label says. If Consolidated Messenger’s company
policy is to disallow all macros in all Excel workbooks, its employees
would select the Disable All Macros Without Notification
option.
Important
Because it is possible to write macros that act as viruses,
potentially causing harm to your computer and spreading copies of
themselves to other computers, you should never choose the Enable
All Macros security setting, even if you have virus-checking
software installed on your computer.