![]() ![]() | ||
Just as with list boxes, you can remove items from combo boxes using the Items.Remove and Items.RemoveAt methods. You just pass the object to remove to Items.Remove of the index of the item you want to remove from the combo box's list to Items.RemoveAt.
Here's an example. In this case, I'll remove item 1 in the list this way:
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
ComboBox1.Items.RemoveAt(1)
End Sub
Tip |
You should note that removing an item from a combo box changes the indices of the remaining items. After you remove item 1 in the above example, item 2 now gets index 1, and item 3 gets index 2. |
![]() ![]() | ||