Counts how many items selected in a listbox (multi-selection listbox).
Works with Listbox_SelectedIndexes
Function ListBox_SelectionCount(LiBox As MSForms.ListBox)
' Counts how many items selected in a listbox
Rett = 0
For I = 1 To LiBox.ListCount
If LiBox.Selected(I - 1) Then
Rett = Rett + 1
End If
Next
ListBox_SelectionCount = Rett
End Function
' Counts how many items selected in a listbox
Rett = 0
For I = 1 To LiBox.ListCount
If LiBox.Selected(I - 1) Then
Rett = Rett + 1
End If
Next
ListBox_SelectionCount = Rett
End Function
LiBox As MSForms.ListBox
Views 298
Downloads 41
CodeID
DB ID
ANmarAmdeen
613
Revisions
v2.0
Thursday
April
21
2022