Thanks it works well in the same workbook but it doesn't work in my other workbook
this is the error:
User defined type not defined
with this line of code:
Private Sub LvTest_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)
This is a whole code:
Private Sub LvTest_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)
With LvTest
If .SortKey = ColumnHeader.Index - 1 Then
If .SortOrder = lvwAscending Then
.SortOrder = lvwDescending
Else
.SortOrder = lvwAscending
End If
Else
.SortKey = ColumnHeader.Index - 1
End If
.Sorted = True
End With
End Sub
Any idea why this has happened when I have changed the workbooks? and how to fix it?
Thanks
Bookmarks