Microsoft Office Tutorials and References
In Depth Information
Identifying Parts of the Menu System . 365
Command Bar Controls . . . . . . . . . . . . . 371
The ability to manipulate menus in Microsoft Excel is very important when creating custom
add-ins. By trapping the appropriate events in an add-in, the add-in can automatically add
the appropriate menu items, making the add-in appear to be a standard part of Excel. In this
chapter, you’ll learn about the various objects associated with menus and toolbars and how to
add new menu items, modify existing menu items, and undo the changes your application
made, to restore Excel to its unmodified state.
Identifying Parts of the Menu System
Microsoft has developed a very flexible object model that combines menus, command
buttons, combo boxes, and pop-up menus into a single extendable system. (See Figure 17-1.)
This system separates the visual presentation of the choices to the user from the underlying
hierarchical structure menus and buttons, which simplifies the development process.
Figure 17-1. The CommandBar set of objects gives VBA programmers a lot of flexibility to
integrate their applications into Excel.