Microsoft KB Archive/930076

= Error message when you click buttons for macros in the Excel 2007 Quick Access Toolbar: &quot;Cannot run the macro&quot; =

Article ID: 930076

Article Last Modified on 10/15/2007

-

APPLIES TO


 * Microsoft Office Excel 2007

-



SYMPTOMS
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 ' '. The macro may not be available in this workbook or all macros may be disabled.



CAUSE
This behavior occurs when one of the following conditions is true:
 * The macro is stored in a file that is not open. Additionally, the file was not saved in the My Documents folder before the macro was added to the Quick Access Toolbar.
 * Macros have been disabled.



RESOLUTION
To resolve the first condition, follow these steps:
 * 1) Move the file that contains the macro to the My Documents folder.
 * 2) Open the file in Excel 2007.
 * 3) Click the Microsoft Office button, and then click Excel Options.
 * 4) Click Customize.
 * 5) Click the macro in the Customize Quick Access Toolbar list, and then click Remove.
 * 6) In Choose commands from, click Macros.
 * 7) Click the macro, click Add, and then click OK.

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.

Additional query words: XL2007 Excel2007

Keywords: kberrmsg kbtshoot kbmenu kbtoolbar kbprb kbexpertisebeginner KB930076

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.