Excel VBA UserForm Listbox Learn how to clear all the items
The source code used in this video:
Private Sub cbRemove_Click()
For i = lbDays.ListCount - 1 To 0 Step -1
If lbDays.Selected(i) Then lbDays.RemoveItem (i)
Next i
End Sub
Private Sub cbRemoveAll_Click()
lbDays.Clear
End Sub
Private Sub UserForm_Initialize()
With lbDays
.AddItem "Monday"
.AddItem "Tuesday"
.AddItem "Wednesday"
End With