AddItem Method

AddItem Method

See Also         Example         Applies To         Specifics

Adds a list item to the specified command bar combo box control. The combo box control must be a custom control and must be a drop-down list box or a combo box.

Note   This method will fail if it's applied to an edit box or a built-in combo box control.

Syntax

expression.AddItem(Text, Index)

expression   Required. An expression that returns a CommandBarComboBox object.

Text   Required String. The text added to the control.

Index   Optional Variant. The position of the item in the list. If this argument is omitted, the item is added to the end of the list.