Command Bars Collection Properties

The Application, Count, Creator, and Parent properties are defined at the beginning of this appendix.

Name

Returns

Description

ActionControl

CommandBar Control

Read-only. Returns the CommandBarControl object whose OnAction property is set to the running procedure. If the running procedure was not initiated by a command bar control, this property returns Nothing.

ActiveMenuBar

CommandBar

Read-only. Returns a CommandBar object that represents the active menu bar in the container application. This almost always returns the application's Worksheet menu bar.

AdaptiveMenus

Boolean

Set/Get whether adaptive (abbreviated) menus are enabled.

DisableAskA

QuestionDrop down

Boolean

Set/Get whether the Answer Wizard drop-down menu is enabled. When set to True, the drop-down disappears from the menu bar.

Disable Customize

Boolean

Set/Get whether toolbar customization is disabled. When True, the Customize command becomes disabled on the Tools menu and disappears from the Toolbar's shortcut (right-click) menu.

DisplayFonts

Boolean

Set/Get whether the font names in the Font box are displayed in their actual fonts. Recommend setting this to False on older computer systems with fewer resources.

DisplayKeys InTooltips

Boolean

Set/Get whether shortcut keys are displayed in the ToolTips for each command bar control. This property has no effect on Excel's command bars.

Name

Returns

Description

Display Tooltips

Boolean

Set/Get whether ScreenTips are displayed whenever the user positions the pointer over command bar controls.

Item

CommandBar

Read-only. Returns a CommandBar object from the Command Bars collection with the Index value specified by the Index parameter. Index can also be a string representing the name of the CommandBar.

Large Buttons

Boolean

Set/Get whether the toolbar buttons displayed are larger than normal size.

Menu

Animation Style

MsoMenu Animation

Set/Get the animation type of all CommandBarPopup controls (menus) in the CommandBars collection.

immandBars Collection Methods

Name

Returns

Parameters

Description

Add

MenuBar,

Temporary

Creates a new command bar and adds it to the collection of command bars.

ExecuteMso

idMso

Executes a given control identified by the idMso parameter.

FindControl

CommandBar Control

Type, Id, Tag, Visible

Returns a single CommandBarControl object that fits a specified criterion based on the parameters.

FindControls

CommandBar Controls

Type,Id, Tag, Visible

Returns a series of CommandBar Control objects in a collection that fits the specified criteria based on the parameters.

GetEnabled Mso

Boolean

idMso

Returns True if the control identified by the idMso parameter is enabled.

GetImagedMso

IPictureDisp

idMso, Width, Height

Returns an IPictureDisp object of the control image identified by the idMso parameter.

GetLabelMso

Variant

idMso

Returns the label of the control identified by the idMso parameter as a String.

GetPressed Mso

Boolean

idMso

Returns whether a given toggle Button control identified by the idMso parameter is pressed.

GetScreen tipMso

Variant

idMso

Returns the ScreenTip of the control identified by the idMso parameter as a String.

Name Returns Parameters Description

GetSupertip Variant idMso Returns the supertip of the control

Mso identified by the idMso parameter as a String.

GetVisible Boolean idMso Returns True if the control identified

Mso by the idMso parameter is visible.

ReleaseFocus idMso Releases the user interface focus from all command bars.

0 0

Responses

  • Selam
    How to get all command bars in excel vba 2007?
    8 months ago

Post a comment