Microsoft KB Archive/81561

{| = Excel: Commands Added to Null Menu Don't Open Macro Sheets =
 * width="100%"|

Last reviewed: November 30, 1994

Article ID: Q81561 The information in this article applies to:
 * Microsoft Excel for Windows, version 3.0
 * Microsoft Excel for the Macintosh, version 3.0

Summary:

A custom command added to Excel's null menu bar will not open a closed macro sheet to which the command is referenced. This affects only the null menu bar (the menu that is displayed when there is no active document window). On other menu bars, a command that references a closed macro sheet causes Excel to open the macro sheet and execute the macro (provided the macro sheet is in the current directory).

If the null menu is displayed, selecting a command referenced to a closed macro sheet will either result in the following error message or will be ignored:

Cannot find 'Hard Drive:Folder:ExternalMacroSheet!AssignedMacro' In Microsoft Excel for Windows, the custom command will be available on the null menu, but nothing happens when it is chosen. This problem was corrected in Microsoft Excel version 4.0. To obtain an update, contact Microsoft Consumer Sales at (800) 426-9400.

Workaround for Excel 3.0
The workaround for this problem is to reference only macros on a macro sheet that will be open (but hidden) when the command is executed from the null menu bar. Create small macros that open the appropriate macro sheet then execute the external macro. For example:

A1: OpenCommandMacro A2: =OPEN(&quot;ExternalMacroSheet&quot;) A3: =RUN(&quot;MacroSheet!CommandMacro&quot;) A4: =RETURN In the example above, the command that eventually runs MacroSheet!CommandMacro will reference the macro OpenCommandMacro. Note: This approach will not work if all macro sheets are closed.

Reference(s):

&quot;Microsoft Excel Function Reference,&quot; for the Macintosh, version 3.0, pages 6-7
 * }