In This Chapter
Although the Ribbon has replaced menus and toolbars, Excel 2007 still offers developers the opportunity to customize the shortcut menus. Typically, right-clicking an item displays a context-sensitive shortcut menu containing relevant commands. In this chapter, I cover the following:
How to identify shortcut menus
How to customize the shortcut menus
How to disable shortcut menus
How to use events in conjunction with shortcut menus
How to create a completely new shortcut menu
CommandBar object takes on a much less significant role in Excel 2007. This chapter covers the
CommandBar object as it relates to customizing shortcut menus.
CommandBar object is used for three Excel user interface elements:
Customs shortcut (right-click) menus
In Excel 2007, the
CommandBar object is in a rather odd position. If you write VBA code to customize a menu or a toolbar, Excel intercepts that code and ignores many of your commands. As I describe in Chapter 22, menu and toolbar customizations performed with the
CommandBar object appear in the Add-Ins Menu Commands or the Add-Ins Custom Toolbars group. So, for all practical purposes, the
CommandBar object in Excel 2007 is limited to shortcut menu operations. ...