Exforsys

Free Training

Counting identical items in listbox

This is a discussion on Counting identical items in listbox within the Visual Basic Tutorials forums, part of the Articles and Tutorials category; Is there a way to count identical items in a listbox ? VB 2005.net...

Go Back   Exforsys > Articles and Tutorials > Visual Basic Tutorials

Exforsys.com


Visual Basic Tutorials Visual Basic Tutorials Discussions.

Reply

 

LinkBack Thread Tools Search this Thread
  #1 (permalink)  
Old 03-07-2008, 05:27 AM
Fatboy58
 
Join Date: Mar 2008
Location: Europe
Posts: 1
Fatboy58 is on a distinguished road
Counting identical items in listbox

Is there a way to count identical items in a listbox ?

VB 2005.net
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-08-2008, 05:18 AM
Member
 
Join Date: Jan 2006
Posts: 34
Guptha_S is on a distinguished road
Yes create another temp list box and add each item form actual list box to temp list box, before add check if the item is already present or not


For Each xitem In Me.somelist
If NOT (Me.templist.Items.Contains(xitem.someitemdata)) Then
Me.templist.Items.Add(xitem.someitemdata)
End If
Next

later on you can cleanup actual list and load items from temp list, keeping temp list invisible all the while

This may not be optimal method, I have given you just a method
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On


Similar Threads

Thread Thread Starter Forum Replies Last Post
javascript - display items in listbox matching the keys pressed sansircar Microsoft .NET 0 02-05-2007 05:55 PM


All times are GMT -4. The time now is 08:27 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0
Copyright 2004 - 2009 Exforsys Inc. All rights reserved.