I have a ListBox1
list in a userform configured for multiple item selection. Is there a function, statement or way to return the number of selected items?
I have a ListBox1
list in a userform configured for multiple item selection. Is there a function, statement or way to return the number of selected items?
I think this code should help you.
Dim intIndex As Integer
Dim intCount As Integer
With ListBox1
For intIndex = 0 To .ListCount - 1
If .Selected(intIndex) Then intCount = intCount + 1
Next
End With
Label1.Caption = "Selecionados " & intCount & " de " & ListBox1.ListCount