-
July 4th, 2005, 02:02 AM
#1
multiselect property of the listbox should be max 7 items
hi
can some1 pls help. i need to make a listbox multiselect but the user can select only 7 items from the list. From the multiselect property of the list box i am selecting simple option. this property allows the user to select more then 7 items from the list box but i want the user can select only 7 items.
can some1 pls tell how to go about
thanks in advance.
-
July 4th, 2005, 02:54 AM
#2
Re: multiselect property of the listbox should be max 7 items
Put this code in the Click/MouseDown Event of the Listbox. This will allow only 7 items to be selected
Code:
'Check if the Selected Item count is greater than 7
If List1.SelCount > 7 Then
'Set the last Selected Item as False
List1.Selected(List1.ListIndex) = False
'Display a Message
MsgBox "You Cannot Select more than 7 Items", vbInformation
End If
-
July 4th, 2005, 04:49 AM
#3
Re: multiselect property of the listbox should be max 7 items
Thanks u r suggestion worked
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|