Command BarCombo Box Methods

Name Returns Parameters Description

AddItem

Text as String, Index as Variant

Adds a list item to the specified CommandBarComboBox. The combo box control must be a custom control and must be a drop-down list box or a combo box. This method will fail if it's applied to an edit box or a built-in ComboBox control.

Name

Returns

Parameters

Description

Clear

Removes all list items from a CommandBarComboBox (drop-down list box or combo box) and clears the text box (edit box or combo box). This method will fail if it's applied to a built-in command bar control.

Copy

CommandBar control

Bar, Before

Copies a CommandBarComboBox to an existing command bar.

Delete

Temporary

Deletes the specified CommandBar ComboBox from its collection. Set Temporary to True to delete the control for the current session only — the application will display the control again in the next session.

Execute

Runs the procedure or built-in command assigned to the specified CommandBarComboBox. For custom controls, use the OnAction property to specify the procedure to be run.

Move

CommandBar Control

Bar, Before

Moves the specified CommandBar ComboBox to an existing command bar.

Removeltem

Index As Long

Removes a specified item from a CommandBarComboBox.

Reset Resets a built-in CommandBar

ComboBox to its default configuration, or resets a built-in CommandBar ComboBox to its original function and face.

SetFocus Moves the keyboard focus to the specified CommandBarComboBox. If the control is disabled or isn't visible, this method will fail.

0 0

Post a comment