ControlFormat.RemoveItem(Int32, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Removes one or more items from a list box or combo box.
public void RemoveItem (int Index, object Count);
Public Sub RemoveItem (Index As Integer, Optional Count As Object)
Parameters
- Index
- Int32
Required 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
- Object
Optional 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.