how would you clear a listbox, like with a button.
Printable View
how would you clear a listbox, like with a button.
How do you add an item? You call the Add method of its Items collection. So, how do you suppose you clear the items?
Removes all listbox items
vb Code:
ListBox1.Items.Clear()
Removes a single selected listbox item
vb Code:
ListBox1.Items.Remove(ListBox1.SelectedItem)
thanks Vexslasher!