Error message when you click buttons for macros in the Excel 2007 Quick Access Toolbar: "Cannot run the macro"


Consider the following scenario. You add a macro to the Quick Access Toolbar in Microsoft Office Excel 2007. Then you close Excel 2007. Later, when you are working in Excel 2007, you click the button for a macro. In this scenario, you receive the following error message:
Cannot run the macro 'macroname'. The macro may not be available in this workbook or all macros may be disabled.


This behavior occurs when one of the following conditions are true:
  • The macro is stored in a file that is not open.
  • Macros have been disabled.


To determine whether macros have been disabled, follow these steps:
  1. Click the Microsoft Office button, and then click Excel Options.
  2. Click Trust Center.
  3. Click Trust Center Settings.
  4. Click Macro Settings.

More Information

For more information about macro security settings, see Excel 2007 Help.

Article ID: 930076 - Last Review: Nov 16, 2008 - Revision: 1