• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to order table items regardless of the line it starts

S P P

Member
How to order table items regardless of the line it starts

>>> 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:
Back
Top