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

Last reviewed: November 29, 1994
Article 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.


KBCategory: kbusage
KBSubcategory:

Additional words: 1.5 1.50 2.2 2.20 3.0 3.00 4.0 4.00
macrosheet


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 29, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.