COLUMN click in listview as Function

User avatar
sal21
PlatinumLounger
Posts: 4355
Joined: 26 Apr 2010, 17:36

COLUMN click in listview as Function

Post by sal21 »

the code attached order by Tag a clicked column in listview.

but is possible to make this code as Function based the column clicked in any listview of my project?
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78483
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: COLUMN click in listview as Function

Post by HansV »

Try the function in the attached file.
function_txt.txt
You can use it like this:

Code: Select all

Private Sub ListView1_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)
    SortCol Me.ListView1, ColumnHeader
End Sub
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4355
Joined: 26 Apr 2010, 17:36

Re: COLUMN click in listview as Function

Post by sal21 »

HansV wrote:Try the function in the attached file.
function_txt.txt
You can use it like this:

Code: Select all

Private Sub ListView1_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)
    SortCol Me.ListView1, ColumnHeader
End Sub
:clapping: :clapping: :clapping: :clapping: :cheers: