CommandBar members (Office)
Represents a command bar in the container application. The CommandBar object is a member of the CommandBars collection.
Methods
Name | Description |
---|---|
Delete | Deletes the CommandBar object from the collection. |
FindControl | Gets a CommandBarControl object that fits a specified criteria. |
Reset | Resets a built-in command bar to its default configuration. |
ShowPopup | Displays a command bar as a shortcut menu at the specified coordinates or at the current pointer coordinates. |
Properties
Name | Description |
---|---|
AdaptiveMenu | Gets a Boolean value that specifies whether the command bar should include an adaptive menu. Read/write. |
Application | Gets an Application object that represents the container application for the CommandBar object (you can use this property with an Automation object to return that object's container application). Read-only. |
BuiltIn | Gets True if the specified command bar is a built-in command bar of the container application. Returns False if it is a custom command bar. Read-only. |
Context | Gets or sets a string that determines where a command bar will be saved. The string is defined and interpreted by the application. Read/write. |
Controls | Gets a CommandBarControls object that represents all the controls on a command bar. Read-only. |
Creator | Gets a 32-bit integer that indicates the application in which the CommandBar object was created. Read-only. |
Enabled | Gets or sets a Boolean value that specifies whether the specified CommandBar is enabled. Read/write. |
Height | Gets or sets the height of a CommandBar. Read/write. |
Index | Gets a Long representing the index number for a CommandBar object in the collection. Read-only. |
Left | Gets or sets the horizontal distance (in pixels) of the CommandBar from the left edge of the object relative to the screen. Read/write. |
Name | Gets the name of the built-in CommandBar object. Read-only. |
NameLocal | Gets the name of a built-in command bar as it's displayed in the language version of the container application, or returns or sets the name of a custom command bar. Read/write. |
Parent | Gets the Parent object for the CommandBar object. Read-only. |
Position | Gets or sets an MsoBarPosition constant representing the position of a command bar. Read/write. |
Protection | Gets or sets an MsoBarProtection constant representing the way a command bar is protected from user customization. Read/write. |
RowIndex | Gets or sets the docking order of a command bar in relation to other command bars in the same docking area. Can be an integer greater than zero, or either of the following MsoBarRow constants: msoBarRowFirst or msoBarRowLast. Read/write. |
Top | Gets or sets the distance from the top edge of the specified command bar, to the top edge of the screen. For docked command bars, this property returns or sets the distance from the command bar to the top of the docking area. Read/write. |
Type | Gets the type of command bar. Read-only. |
Visible | Gets or sets the Visible property of the command bar. True if the command bar is visible. Read/write. |
Width | Gets or sets the width (in pixels) of the specified command bar. Read/write. |
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.