Microsoft KB Archive/70113

{| = &quot;Cannot Find Macro&quot; When Choosing Repeat from Edit Menu =
 * width="100%"|

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 &quot;Cannot Find Macro&quot; 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:

  The name must be text, for example: CUSTOM.REPEAT(&quot;Macro1!MyMacro&quot;)  If the macro is not an add-in macro, the macro sheet must be included before the name of the macro. Therefore, the macro &quot;MyMacro&quot; on the macro sheet &quot;Macro1&quot; would be &quot;Macro1!MyMacro&quot;. 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.  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): &quot;'My Macro Sheet'!MyMacro&quot; 

For more information on the CUSTOM.REPEAT function, see page 42 of the &quot;Microsoft Excel Functions Reference&quot; version 3.0 manual.
 * }