Hi, can anyone help?
I want to remove .Select from the Sort to make things run more smoothly
Regards
pwill
I want to remove .Select from the Sort to make things run more smoothly
Code:
.Range("A2:K" & lRowA).Select
.Range(Selection, Selection.End(xlDown)).Select
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add Key:=Range("E2:E" & lRowA), _
SortOn:=xlSortOnValues, Order:=xlAscending, CustomOrder:= _
"1,2,3,4,5,6,7" _
, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Sheet1").Sort
.SetRange Range("A2:K" & lRowA)
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Regards
pwill
Last edited: