_CommandBarComboBox.AddItem(String, Object) Method

Definition

Adds a list item to the specified command bar combo box control.

public void AddItem (string Text, object Index);
abstract member AddItem : string * obj -> unit
Public Sub AddItem (Text As String, Optional Index As Object)

Parameters

Text
String

Required String. The text added to the control.

Index
Object

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

Remarks

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 combo box control.

Notes to callers

Applies to