PC Review


Reply
Thread Tools Rate Thread

How to count selected items in listbox

 
 
=?Utf-8?B?TmFtZXNwYWNl?=
Guest
Posts: n/a
 
      3rd Feb 2005
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
 
Reply With Quote
 
 
 
 
Scott M.
Guest
Posts: n/a
 
      3rd Feb 2005
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.


"Namespace" <(E-Mail Removed)> wrote in message
news:907C1D7A-B9EB-49DB-BB98-(E-Mail Removed)...
> 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



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Listbox selected count livin''''life Microsoft Access Forms 3 23rd Mar 2010 08:42 PM
Count selected items in a listbox Wendy Microsoft Access Forms 2 9th Sep 2009 05:54 AM
Returning selected items in a listbox into another listbox DShikotra Webmaster / Programming 0 8th Jan 2008 02:25 PM
Listbox move multiple selected items to second listbox K B Microsoft ASP .NET 2 8th Jan 2007 11:16 AM
Getting Selected Items from a ListBox mzam Microsoft Dot NET Framework Forms 3 24th Aug 2004 08:33 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:34 PM.