multiselect listbox

  • Thread starter Thread starter CG Rosén
  • Start date Start date
C

CG Rosén

Good Day Group,

What syntax to use to state that a MultiSelect
Listbox has no selection? To be used in the context:
If ListBox1 .....no selection.... Then etc...

Brgds

CG Rosén
 
Try this

N = 0
For i = 0 To Userform1.ListBox1.ListCount - 1
If Userform1.ListBox1.Selected(i) = True Then
N = N + 1
End If
Next i
If N = 0 Then MsgBox "no selection"
 
Back
Top