Microsoft KB Archive/213463

= XL2000: "Cannot Find Macro" Error Message When Running Macro from Object =

Article ID: 213463

Article Last Modified on 10/11/2006

-

APPLIES TO


 * Microsoft Excel 2000 Standard Edition

-



This article was previously published under Q213463





SYMPTOMS
In Microsoft Excel 2000, if you have a defined name in a workbook that is the same as a macro name on a Microsoft Visual Basic for Applications module, one of the following error messages may appear

Cannot find macro.

-or-

The macro  cannot be found.

where  is the name of the macro assigned to the object.



RESOLUTION
To ensure that you don't receive this error message, do either of the following:
 * Use unique names for macros as well as for names on worksheets.

-or-
 * Specify the complete path to the macro, as in the following example:

.



MORE INFORMATION
Worksheet names take precedence over the names of macros on module sheets. Therefore, the macro name assigned to the object is replaced with the newly defined workbook name (which is not a macro).

Additional query words: macro XL2000

Keywords: kberrmsg kbprb kbprogramming KB213463

-

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

© Microsoft Corporation. All rights reserved.