CommandBars members (Office)

A collection of CommandBar objects that represent the command bars in the container application.

Events

Name Description
OnUpdate Occurs when any change is made to a command bar.

Methods

Name Description
Add Creates a new command bar and adds it to the collection of command bars.
CommitRenderingTransaction Commits the rendering transaction. Returns Nothing.
ExecuteMso Executes the control identified by the idMso parameter.
FindControl Gets a CommandBarControl object that fits a specified criteria.
FindControls Gets the CommandBarControls collection that fits the specified criteria.
GetEnabledMso Returns True if the control identified by the idMso parameter is enabled.
GetImageMso Returns an IPictureDisp object of the control image identified by the idMso parameter scaled to the dimensions specified by width and height.
GetLabelMso Returns the label of the control identified by the idMso parameter as a String.
GetPressedMso Returns a value indicating whether the toggleButton control identified by the idMso parameter is pressed.
GetScreentipMso Returns the screentip of the control identified by the idMso parameter as a String.
GetSupertipMso Returns the supertip of the control identified by the idMso parameter as a String.
GetVisibleMso Returns True if the control identified by the idMso parameter is visible.
ReleaseFocus Releases the user interface focus from all command bars.

Properties

Name Description
ActionControl Gets the CommandBarControl object whose OnAction property is set to the running procedure. Read-only.
ActiveMenuBar Gets a CommandBar object that represents the active menu bar in the container application. Read-only.
AdaptiveMenus Checks or unchecks the check box control for the option to show menus in Microsoft Office as full or personalized. Read/write.
Application Gets an Application object that represents the container application for the CommandBars object (you can use this property with an Automation object to return that object's container application). Read-only.
Count Gets a count of the number of command bars in the host application. Read-only.
Creator Gets a 32-bit integer that indicates the application in which the CommandBars object was created. Read-only.
DisableAskAQuestionDropdown Is True if the Answer Wizard dropdown menu is enabled. Read/write.
DisableCustomize Is True if toolbar customization is disabled. Read/write.
DisplayFonts Is True if the font names in the Font box are displayed in their actual fonts. Read/write.
DisplayKeysInTooltips Is True if shortcut keys are displayed in the ToolTips for each command bar control. Read/write.
DisplayTooltips Is True if ScreenTips are displayed whenever the user positions the pointer over command bar controls. Read/write.
Item Gets a CommandBar object from the CommandBars collection. Read-only.
LargeButtons Is True if the toolbar buttons displayed are larger than normal size. Read/write.
MenuAnimationStyle Gets or sets an MsoMenuAnimation that represents the way a command bar is animated. Read/write.
Parent Gets the Parent object for the CommandBars object. Read-only.

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.