Excel: "Macro Not Found" When Item Chosen from Custom Menu

ID: Q36951


The information in this article applies to:
  • Microsoft Excel for the Macintosh, versions 1.5, 2.2, 3.0, 4.0


SUMMARY

When there are spaces in the name of a Microsoft Excel macro sheet that contains a macro to be run from a custom menu command, single quotation marks must be included around the name of the macro sheet in the menu definition table. If you choose a custom menu command that refers to a macro sheet with spaces in its name and its name is not enclosed in single quotation marks, you will receive an error indicating that the macro could not be found.

For example, if the name of the macro sheet is Macro1 Test and the name of the macro is Delete, the command macro references in the menu definition table should be as follows:


   'Macro1 Test'!Delete 


The following is not correct:


   Macro1 Test!Delete 


NOTE: If the macro is included on the same macro sheet as the menu definition table, the macro sheet name can be excluded for the command macro references.

Additional query words:

Keywords :
Version :
Platform :
Issue type :


Last Reviewed: March 12, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.