XL97: Change in ADD.MENU Macro Position Argument

Last reviewed: January 15, 1998
Article ID: Q157347
The information in this article applies to:
  • Microsoft Excel 97 for Windows

SYMPTOMS

If you run a Microsoft Excel version 4.0 (XLM) macro that contains the ADD.MENU macro function, the location of the menu you add may be different than in earlier versions of Microsoft Excel.

CAUSE

The XLM ADD.MENU macro function has an optional third argument called Position. In Microsoft Excel versions 4.0, 5.0 and 7.0, if you do not specify anything for the Position argument, the ADD.MENU function adds your custom menu to the left of the Help menu. In Microsoft Excel 97, if you do not use the Position argument, the function adds your custom menu to the right of the Help menu.

RESOLUTION

If you want your custom menu to appear immediately to the left of the Help menu in Microsoft Excel 97, you must specify something for the Position argument. For example, if you have your Menu definition table in a defined name called "Testmenu" and you want your custom menu to appear on the Worksheet menu bar, use the following macro command:

   =ADD.MENU(10,Testmenu,"Help")

STATUS

This behavior is by design of Microsoft Excel 97.

MORE INFORMATION

The ADD.MENU macro function has the following syntax:

   =ADD.MENU(bar_num, menu_ref, Position)

with the first two arguments being required.

Descriptions of the ADD.MENU arguments

bar_num: the ID number for the menu bar to which you want your menu added.

menu_ref: the reference on your Macro sheet for your Menu definition table.

Position: a name (as text) or number of an existing menu. Custom menus are

          added to the left of the menu specified with the Position
          argument.


Additional query words: XL97
Keywords : xlmhowto xlminfo kbmacro kbprg
Version : WINDOWS:97
Platform : WINDOWS


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