XL97: Menu Added in Wrong Position on Menu Bar (158072)
The information in this article applies to:
- Microsoft Excel 97 for Windows
This article was previously published under Q158072 SYMPTOMS
In Microsoft Excel 97, when you run a Visual Basic for Applications macro
that adds a new menu to a menu bar, the new menu appears to the right of
the Help menu, rather than to the left of it.
CAUSE
This will occur because, in Microsoft Excel 97, the Help menu does not have
any special status. In earlier versions of Microsoft Excel, new menus
cannot be created to the right of the Help menu.
This behavior is by design of Microsoft Excel.
WORKAROUND
If you need a custom menu to be created to the left of the Help menu, add
the "Before:=" argument to the line of code that creates the new menu. For
example:
MenuBars(xlWorksheet).Menus.Add Caption:="Custom", Before:="Help"
You can use any valid menu name in the Before argument. The new menu will
be created to the left of the specified menu name.
| Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
|---|
| Keywords: | kbdtacode kbprb kbProgramming KB158072 |
|---|
|