rockchalk33
Board Regular
- Joined
- Jan 12, 2016
- Messages
- 111
There has to be an easy way to count the number of selected items in a ListBox and display them in a message box?
Please help,
Thanks
Devin
Please help,
Thanks
Devin
Private Sub CommandButton13_Click()
For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) = True Then
Numselections = Numselections + 1
End If
Next i
MsgBox Numselections
End Sub
Try this:
Code:Private Sub CommandButton13_Click() For i = 0 To ListBox1.ListCount - 1 If ListBox1.Selected(i) = True Then Numselections = Numselections + 1 End If Next i MsgBox Numselections End Sub
Thats what I needed! Thanks! Sorry about the duplicate posting