Sorting numeric/dates a listview
![Visual Basic 6, or VB Classic Visual Basic 6, or VB Classic](https://www.fortypoundhead.com//assets/img/icons/v7/vb6.png)
This code is an adapt form MSDN.
It will sort numeric - or on dates - any column with the apropriate tag (be aware that the column values must be all numeric or dates - according with the tag of the column )
It uses only one module - and on the form with the listview 1 line of code !
IF
Original Author: Ignat Andrei
Inputs
Nothing
Assumptions
See How To on MSDN
Returns
Nothing
Side Effects
Crash the application (it uses subclassing !) if the column values does not agree with with the tag of the column (if the tag is not date or numeric - then it uses standard sort order )
API Declarations
' the only line used on the form to sort
Private Sub lvwTest_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)
SetListViewOrder lvwTest, ColumnHeader
End Sub
About this post
Posted: 2002-06-01
By: ArchiveBot
Viewed: 88 times
Categories
Attachments
Sorting_nu644613222002.zip
Posted: 9/3/2020 3:45:00 PM
Size: 6,332 bytes
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.