this should be easy. how can i delete items in a listbox?
Printable View
this should be easy. how can i delete items in a listbox?
VB Code:
List1.RemoveItem 0
:)
where 0 is the index of the item you are removing ;)
Try this
VB Code:
Private Sub Form_Click() While list1.ListCount > 0 list1.RemoveItem list1.ListCount - 1 Wend End Sub Private Sub Form_Load() list1.AddItem "Play" list1.AddItem "Boy" End Sub
unfortunately, this example will result in an error. You'll have to go backwards through the listQuote:
Originally posted by prog_tom
Try this
VB Code:
Dim i as Long For i = 0 to List1.ListCount List1.RemoveItem i Next i
:)
Well I fixed the problem...