
- Forum
- Programming Talk
- Microsoft .NET
- Counting identical items in listbox
Counting identical items in listbox
This is a discussion on Counting identical items in listbox within the Microsoft .NET forums, part of the Programming Talk category; Is there a way to count identical items in a listbox ? VB 2005.net...
-
Counting identical items in listbox
Is there a way to count identical items in a listbox ?
VB 2005.net
-
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

Reply With Quote





