by Ignat Andrei (1 Submission)
Category: Miscellaneous
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating:
(5 Votes)
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
Inputs
Nothing
Assumes
See How To on MSDN
Code 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