Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting listbox items by date?

Status
Not open for further replies.

r3b00t

Technical User
Aug 13, 2002
45
GB
Hi

Is it possible to sort listbox items by date, if so could someone please explain?

I have three entries per item, the date being the second.

Regards

r3b00t
 
Is this a listbox or a listview, cos listbox doesn't usually have 3 columns of related data.
Or are you concatenating strings to fake it in a listbox?
If it's a listview then you can sort on any column by setting the SortKey value, either in code or on the property page.
There's some clear stuff in VBHelp on it as well. Let me know if this helps
________________________________________________________________
If you are worried about how to post, please check out FAQ222-2244 first

'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
 
Im concantenating the strings to fake the columns in the listbox.

So is there any way to sort the items by the date that has been entered?

Regards

r3b00t
 
Some people use am invisible ListBox with Sorted=True, rearrange the data for the sort, Clear and Add to the invisible Listbox, extracct the sorted data and Clear and Add back to original, rearranging the data. Forms/Controls Resizing/Tabbing Control
Compare Code (Text)
Generate Sort Class in VB or VBScript
 
A bit past me but never mind =$

Thanx anyway

r3b00t
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top