CommandBarComboBox.RemoveItem Method
Removes an item from a CommandBarComboBox control.
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." |
Note
|
|---|
| The property fails when applied to controls other than list controls. |
Syntax
expression.RemoveItem(Index)
expression A variable that represents a CommandBarComboBox object.
Parameters
| Name | Required/Optional | Data Type | Description |
|---|---|---|---|
| Index | Required | Integer | The item to be removed from the list. |
Example
This example determines whether there are more than three items in the specified combo box. If there are more than three items, the example removes the second item, alters the style, and sets a new value. It also sets the Tag property of the parent object (the CommandBarControl object) to show that the list has changed.
| Visual Basic for Applications |
|---|
|
Note