Macro security was a key priority in developing Excel 2007. The reason is that macros are powerful-so powerful that they can do serious damage to your computer. The macro security features in Excel 2007 were created to help prevent macro-related problems.
Figure 22-2 shows the Macro Settings section of the Trust Center dialog box. To display this dialog box, choose Developer Macro Security.
Figure 22-2: The Macro Settings section of the Trust Center dialog box.
By default, Excel uses the Disable All Macros with Notification option. With this setting in effect, if you open a workbook that contains VBA macros (and the file is not digitally "signed" or is from an untrusted location), Excel displays a Security Warning above the Formula bar. (See Figure 22-3.) If you are certain that the workbook comes from a trusted source and the macros are safe, click the Options button, which displays a dialog box in which you can enable the macros in the workbook.
Figure 22-3: Excel's Security Warning that the file contains macros.
Note | If the VBA window is open when you open a workbook that contains macros, Excel does not display the Security Warning in the workbook. Rather, it displays the dialog box shown in Figure 22-4. You can use this dialog box to enable or disable the macros. |
Figure 22-4: You see this warning when the VBA window is open and a workbook contains macros.
Perhaps the best way to handle macro security is to designate one or more folders as trusted locations. All workbooks in a trusted location are opened without a macro warning. You designate trusted folders in the Trusted Locations section of the Trust Center dialog box.