Share via


_CommandBarComboBox.AddItem Method

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

Namespace:  Microsoft.Office.Core
Assembly:  office (in office.dll)

Syntax

'Declaration
Sub AddItem ( _
    Text As String, _
    Index As Object _
)
'Usage
Dim instance As _CommandBarComboBox
Dim Text As String
Dim Index As Object

instance.AddItem(Text, Index)
void AddItem(
    string Text,
    Object Index
)

Parameters

  • Text
    Type: System.String

    Required String. The text added to the control.

  • Index
    Type: System.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

See Also

Reference

_CommandBarComboBox Interface

_CommandBarComboBox Members

Microsoft.Office.Core Namespace