VBA detect ListBox MultiSelect
Private Sub commandMultiSelect_Click()
Dim x As Integer
For x = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(x) = True Then
TextBox1.Value = TextBox1.Value & "ListBox1.Selected(" & x & ")" & vbCrLf
End If
Next
End Sub
Private Sub UserForm_Initialize()
Dim Y As Integer
For Y = 1 To 100
ListBox1.AddItem Y
Next Y
End Sub