Gets a CommandBar object that represents the menu displayed by the specified pop-up control. Read-only.

Note
The use of CommandBars in some Microsoft Office applications has been superseded by the new Ribbon user interface. For more information, search help for the keyword "Ribbon."

Syntax

expression.CommandBar

expression A variable that represents a CommandBarPopup object.

Example

This example sets the variable fourthLevel to the fourth control on the command bar named "Drawing."

Visual Basic for Applications
Set fourthLevel = CommandBars("Drawing") _ .Controls(1).CommandBar.Controls(4)
command command bar Command Bar Property commandbar commandbar property ofv return a command bar object that represents a pop up command bar select a command bar pop up control set a variable for a pop up to a command bar

See also: