"Cannot Find Macro" When Choosing Repeat from Edit Menu

Last reviewed: November 2, 1994
Article ID: Q70113

SUMMARY

In Microsoft Excel version 3.00, when a user macro containing a CUSTOM.REPEAT function is run, choosing Repeat from the Edit menu causes Excel to attempt to run the macro name contained in the first argument of the COMMAND.REPEAT function.

The error message "Cannot Find Macro" will be returned if the name in the first argument of the COMMAND.REPEAT function is not correct.

To verify the macro syntax, activate the macro sheet with the macro on it, and check that the name in the first argument is correct, as follows:

  1. The name must be text, for example:

          CUSTOM.REPEAT("Macro1!MyMacro")
    

  2. If the macro is not an add-in macro, the macro sheet must be included before the name of the macro. Therefore, the macro "MyMacro" on the macro sheet "Macro1" would be "Macro1!MyMacro".

  3. If you do not know whether or not the macro sheet is an add-in, assume it is not. It is always acceptable to include the full name (Sheetname!Macroname); it is not always acceptable to include only the macro name.

  4. Make certain the name of the macro is spelled correctly and has no spaces. Proper syntax for a document with spaces in the name is as follows (note the single quotation marks):

          "'My Macro Sheet'!MyMacro"
    

For more information on the CUSTOM.REPEAT function, see page 42 of the "Microsoft Excel Functions Reference" version 3.0 manual.


KBCategory: kbother
KBSubcategory:

Additional reference words: noupd


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 2, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.