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:
Click the Microsoft Office button, and then click Excel Options.
Click Trust Center.
Click Trust Center Settings.
Click Macro Settings.
For more information about macro security settings, see Excel 2007 Help.