Sort WorkSheetName unknown
How can I make the following work on any worksheet and on whatever the new
range might be "A11:Axxx" - "A11:Jxxx"
Range("A11").Select
ActiveWorkbook.Worksheets("JAN").Sort.SortFields.C lear
ActiveWorkbook.Worksheets("JAN").Sort.SortFields.A dd
Key:=Range("A11:A68") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("JAN").Sort
.SetRange Range("A10:J68")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
|