Fordraiders
asked on
Determine if more than one item selected in listbox
vba 2003 excel
userform listbox
frmliststyleoption.
multiselectext
I simply trying to determine if I have more than 1 item selected in listbox ?
when pressing a command button
Thanks
fordraiders
userform listbox
frmliststyleoption.
multiselectext
I simply trying to determine if I have more than 1 item selected in listbox ?
when pressing a command button
Thanks
fordraiders
Dim Msg As String, h As Integer
Msg = ""
With Me.ListBox1
For h = 0 To .ListCount - 1
If h > 1 Then
MsgBox "Multiple Items Selected", vbCritical, "Item Selection"
Exit Sub
End If
Next h
End With
ASKER
vba does not have property "SelectedItems"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
VB-6 http://www.vb6.us/tutorials/indepth-vb6-listbox-tutorial
VB.NET (below)
Open in new window