ListBox_SelectionCount

Counts how many items selected in a listbox (multi-selection listbox).
Works with Listbox_SelectedIndexes

CodeFunctionName
What is this?

Public

Tested

Original Work
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

LiBox As MSForms.ListBox

Views 287

Downloads 37

CodeID
DB ID