About Excel Menus

Excel has two top-level menu bars, and which menu bar is displayed depends on what has focus in Excel. The worksheet menu bar (Figure 19-1) is displayed when Excel first starts up, when a worksheet has focus, and when all workbooks are closed.

Worksheet menu bar

Figure 19-1. Worksheet menu bar

The chart menu bar (Figure 19-2) appears when a chart sheet or an embedded chart object has focus.

Chart menu bar

Figure 19-2. Chart menu bar

There are also context menus for just about every item in the Excel interface. Context menus pop up when you right-click an item in Excel. For example, Figure 19-3 shows the context menu displayed when you right-click a range of cells.

Tip

Context menus are also sometimes called shortcut menus.

The cell context menu

Figure 19-3. The cell context menu

You can change any of these types of menus to:

  • Add or delete existing commands

  • Create new items that run code

  • Build custom menus of items with multiple levels

The following sections detail how to create and modify each of these types of menus.

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.