Microsoft KB Archive/113793

= Microsoft Knowledge Base =

XL: Err Msg: "Cannot Find Macro..." Using Key Combination
Last reviewed: September 13, 1996

Article ID: Q113793

The information in this article applies to:


 * Microsoft Excel for Windows, version 5.0
 * Microsoft Excel for the Macintosh, version 5.0
 * Microsoft Excel for Windows 95, version 7.0

SYMPTOMS
In Microsoft Excel version, the following error message may appear if you change the name of a Visual Basic macro and then try to run that macro by pressing the key combination assigned to it:

Cannot find macro ' ! '. After the error message appears, and you click the OK button to dismiss it, you can then run the macro successfully using the key combination.

CAUSE
When you change the name of a Visual Basic macro, the key combination assigned to it may not be reassigned right away.

MORE INFORMATION
In Microsoft Excel, you can change the name of a Visual Basic macro by editing the text on a module sheet. For example, you can change

Sub Macro1 to:

Sub Macro2 When you edit the text and change the 1 to a 2, if a control key combination has been assigned to Macro1 through the Macro Options dialog box (also available while recording a macro by choosing the Options button from the Record dialog box), the above error message will occur the first time you use the control key combination (after you have changed the name of the macro to Macro2).