View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Nigel Nigel is offline
external usenet poster
 
Posts: 923
Default Sort Method question


Try......

ActiveSheet.Columns("O:U").Sort Key1:=Range("O1"), Order1:=xlAscending,
Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortTextAsNumbers

Cheers
Nigel

"CG Rosén" wrote in message
...
Good Day Group,

Below code works fine as long Sheet(3) is active. How to
write the code to work also when another WorkSheet is
the active sheet.? Is that possible?

Brgds

CG Rosén

Sheets(3).Columns("O:U").Sort Key1:=Range("O1"), Order1:=xlAscending,
Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortTextAsNumbers