Applies To
MenuBar Object.
Description
Accessor. Returns a single menu (a Menu object, Syntax 1), or a collection of the menus ( a Menus object, Syntax 2) on the menu bar. Read-only.
Syntax 1
object.Menus(index)
Syntax 2
object.Menus
object
Required. The MenuBar object.
index
Required for Syntax 1. The name of the menu as a string, or the number of the menu. For example, on the worksheet menu bar, you return the Help menu with Menus("Help") or with Menus(8).
See Also
MenuItems Method.
Example
This example adds a new menu to the active menu bar. The menu is added immediately to the left of the Help menu.
ActiveMenuBar.Menus.Add caption:="&MyMenu", before:="Help"
This example changes the Open command on the File menu to Open Workbook. The example makes this change to every menu bar in the product.
For Each mb In MenuBars mb.Menus("File").MenuItems(2).Caption = "&Open Workbook" Next mb