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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top