Excel: Commands Added to Null Menu Don't Open Macro Sheets

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("ExternalMacroSheet")
   A3: =RUN("MacroSheet!CommandMacro")
   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):

"Microsoft Excel Function Reference," for the Macintosh, version 3.0, pages 6-7


KBCategory: kbother
KBSubcategory:

Additional reference words: 3.0 3.00


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