How do I find all selected items in a multiselect-listbox?
Printable View
How do I find all selected items in a multiselect-listbox?
VB Code:
For intCount = 1 To ListBox.ListCount - 1 If ListBox.Selected(intCount) = True Then 'Do stuff here End If Next
Loop through the list and check the Selected propertyBest regardsVB Code:
Dim i As Integer For i = 0 To List1.ListCount - 1 If List1.Selected(i) Then Debug.Print "Item number " & i & " is selected" End If Next