Microsoft Excel offers you a wide range of ways to modify the menu system: you can create new menu bars; add new drop-down menus to built-in or custom menu bars; create new shortcut menus; add new menu items (commands, submenus, or separator bars) to built-in or custom drop-down menus, shortcut menus, or submenus; and assign procedures to menu items. In addition, you can restore the built-in menu system to its default state at any time.
Microsoft Excel comes with a built-in menu system. You can modify components of this built-in system or create and modify custom menu components, using either the Menu Editor or Visual Basic.
Modifying a built-in menu bar, menu, or menu item is appropriate if you're adding or changing a small number of components. For example, if you just want to provide menu access to a macro, you can add a menu item to a built-in menu and then link the macro to that item.
If you need to make more extensive changes, it may be more appropriate to create a completely new component. For example, if you want to add several new drop-down menus, each containing several new menu items, it may be more appropriate to create an entirely new menu bar to contain the new menus.
If your menus become crowded and difficult to scan, you can use submenus to organize them more effectively and add clarity to your application by reducing the amount of information presented to the user at any one time. For example, suppose you create a menu that presents a number of options, as shown in the following illustration.
Using submenus, you can present the same items in either of the following ways.
With submenus, the user can browse through commands that might otherwise be available only through a series of custom dialog boxes. However, if you need to create a complicated array of submenus to present a set of commands, a dialog box may in fact be a better solution.
If you want to give the user access to a command that applies to the limited context of a selected object, you can add the command to the shortcut menu for that object.
In addition to making changes to the design of the menu system, you can also use Visual Basic to modify properties of menu components in response to conditions that change while the application is running. For example, you can display or hide a component, enable or disable a component, or add or remove a check mark next to a menu item.