XL2000: Menu Added in Wrong Position on Menu Bar (213569)
The information in this article applies to:
This article was previously published under Q213569 SYMPTOMS
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 behavior occurs because, in Microsoft Excel 2000, the Help menu does not have any special status. In versions of Microsoft Excel earlier than Excel 97, you cannot create new menus to the right of the Help menu.
WORKAROUND
If you need to create a custom menu 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 appear to the left of the specified menu name.
Modification Type: | Minor | Last Reviewed: | 10/10/2006 |
---|
Keywords: | kbdtacode kbprb kbProgramming KB213569 |
---|
|