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:
SYMPTOMSIn 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 '<workbook name>!<macro name>'.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.
CAUSEWhen you change the name of a Visual Basic macro, the key combination assigned to it may not be reassigned right away.
MORE INFORMATIONIn 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).
REFERENCES"Visual Basic User's Guide," version 5.0, Chapter 1, "Setting And Changing Macro Options"
|
|
KBCategory: kbusage kberrmsg
©1997 Microsoft Corporation. All rights reserved. Legal Notices. |