ControlFormat.AddItem Method
Adds an item to a list box or a combo box.
Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
Syntax
'Declaration
Sub AddItem ( _
Text As String, _
Index As Object _
)
'Usage
Dim instance As ControlFormat
Dim Text As String
Dim Index As Object
instance.AddItem(Text, Index)
void AddItem(
string Text,
Object Index
)
Parameters
Text
Type: System.StringRequired String. The text to be added
Index
Type: System.ObjectOptional Object. The position of the new entry. If the list has fewer entries than the specified index, blank items from the end of the list are added to the specified position. If this argument is omitted, the item is appended to the existing list.
Remarks
Using this method clears any range specified by the ListFillRange property.