RemoveItem
This method removes an item from a ListBox, ComboBox, or Grid control.
Syntax
control.RemoveItem index
Parameters
- control
- Required. Object expression that evaluates to a ListBox, ComboBox, or Grid control. This parameter also applies to a CommandBarComboBox object.
- index
- Required. Integer that represents the position within the object of the item or row to remove. For the first item in a ListBox or ComboBox or for the first row in a Grid control, index = 0.
Return Value
None.
Remarks
RemoveItem removes only one item. To remove all items, use the Clear method.
The RemoveItem method for the Grid control deletes the entire row specified. To clear data without removing the rows themselves, use the Clear method.