ControlFormat.RemoveItem Method
Removes one or more items from a list box or combo box.
Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
Syntax
'Declaration
Sub RemoveItem ( _
Index As Integer, _
Count As Object _
)
'Usage
Dim instance As ControlFormat
Dim Index As Integer
Dim Count As Object
instance.RemoveItem(Index, Count)
void RemoveItem(
int Index,
Object Count
)
Parameters
Index
Type: System.Int32Required Integer. The number of the first item to be removed. Valid values are from 1 to the number of items in the list (returned by the ListCount property).
Count
Type: System.ObjectOptional Object. The number of items to be removed, starting at item Index. If this argument is omitted, one item is removed. If Index + Count exceeds the number of items in the list, all items from Index through the end of the list are removed without an error.
Remarks
If the specified object has a fill range defined for it, this method fails.
Use the RemoveAllItems method to remove all entries from a Microsoft Excel list box or combo box.