Limit to Listbox

D

DS

Is there a way to limit how many choices a person can make on a Listbox?
If you have 2 listboes linked to each other can you make the number of
choices correspond to whatever the person choose in the first listbox.
Lets say they choose Item 1 in the first list box they would get 2
choices. If the choose Item 3 in the first, they would get 5 choices...etc.
Thanks
DS
 
J

James Hahn

Use the Click event of the list box to check the Count property of the
ItemsSelected collection. If the maximum number of selected items is
exceeded, deselect one or more of the items in the ItemsSelected list, and
warn the user that they have exceeded the maximum allowed.
 
D

DS

James said:
Use the Click event of the list box to check the Count property of the
ItemsSelected collection. If the maximum number of selected items is
exceeded, deselect one or more of the items in the ItemsSelected list, and
warn the user that they have exceeded the maximum allowed.
Thank You,
I'll give it a try!
DS
 
Top