You receive a message when you try to run a macro in an encrypted workbook in Excel 2007: "Because of your security settings, macros have been disabled"


When you try to run a macro in an encrypted workbook in Microsoft Office Excel 2007, the macro does not run. Additionally, you receive the following message:
Because of your security settings, macros have been disabled. To run macros, you need to reopen this workbook, and then choose to enable macros. For more information about enabling macros, click Help.
To determine the unique number that is associated with the message that you receive, press CTRL+SHIFT+I. The following number appears in the lower-right corner of this message:


To resolve this behavior, install 'The 2007 Microsoft Office Suite Service Pack 2 (SP2) which can be downloaded from the Microsoft Download Center at


Important This article contains information about how to modify the registry. Make sure that you back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows
Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

More Information

For more information about encrypted files and the scanning of encrypted content in the 2007 Microsoft Office programs, click the following article number to view the article in the Microsoft Knowledge Base:

927150 A macro that is contained in an encrypted Office Open XML file does not run in 2007 Office programs

To work around this issue, disable antivirus scanning on encrypted files that contain macros. To do this, follow these steps:
  1. Exit the 2007 Office programs.
  2. Click Start, click Run , type regedit , and then click OK .
  3. Locate and then click the registry subkeys provided below:
  4. On the Edit menu, point to New , and then click DWORD Value .
  5. Type the following value name on the registry subkey that you clicked in step 3, and then press ENTER:

  6. Right-click the DWORD value that you created in step 4, and then click Modify .
  7. In the Value data box, type 1 , and then click OK .
  8. On the File menu, click Exit to exit Registry Editor.
Note The steps above should not be used after Office 2007 SP2 has been installed. This registry information is also provided in the '2007 Microsoft Office Security Guide', but that documentation was created prior to the release of the Office 2007 Service Pack 2.