How to order table items regardless of the line it starts
>>> use code - tags <<<
>>> use code - tags <<<
Code:
Private Sub UserForm_Initialize()
Dim ws As Worksheet
Set ws = Sheets(1)
Set Rng = ws.ListObjects(1).DataBodyRange
' How to order table items regardless of the line it starts
' I'm using it like this
Rng.Sort key1:=Range(A2), Order1:=xlAscending, Header:=xlYes 'xlDescending
' I tried that, but it didn't work
Rng.Sort Key1:=Cells(1), Order1:=xlAscending, Header:=xlYes 'xlDescending
Last edited by a moderator: