How to count selected items in listbox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

Can anybody tell me an easy way to count the number of selected items in a
listbox - not how many items in listbox. Do I really have to run through the
items collection of the listbox to test each item to see if it is selected ?

Thanks
Namespace
 
If you have a listbox that allows for more than one item to be selected at
the same time, then the selectedItem property will hold an array of items
and all arrays support a length property to tell you how many things there
are in the array.
 
Back
Top