VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Sorting numeric/dates a listview

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

Rate Sorting numeric/dates a listview

Download Sorting numeric/dates a listview

Download Sorting numeric/dates a listview (6 KB)

Sorting numeric/dates a listview Comments

No comments have been posted about Sorting numeric/dates a listview. Why not be the first to post a comment about Sorting numeric/dates a listview.

Post your comment

Subject:
Message:
0/1000 characters