G
Guest
Hi,
i have code below to sort a range in my worksheet but it doesn't work
however i can sort it by manually
Sheets(1).Range("A" & Trim(Str(strt)) & ":Q" & Trim(Str(endd -
1))).Select
Selection.Sort Key1:=Range("A" & Trim(Str(strt))),
Order1:=xlAscending, _
Header:=xlYes, OrderCustom:=1, MatchCase:=False, Orientation:= _
xlTopToBottom, DataOption1:=xlSortNormal,
DataOption2:=xlSortNormal, _
DataOption3:=xlSortNormal
i am stock on this problem please help.
Thanks,
i have code below to sort a range in my worksheet but it doesn't work
however i can sort it by manually
Sheets(1).Range("A" & Trim(Str(strt)) & ":Q" & Trim(Str(endd -
1))).Select
Selection.Sort Key1:=Range("A" & Trim(Str(strt))),
Order1:=xlAscending, _
Header:=xlYes, OrderCustom:=1, MatchCase:=False, Orientation:= _
xlTopToBottom, DataOption1:=xlSortNormal,
DataOption2:=xlSortNormal, _
DataOption3:=xlSortNormal
i am stock on this problem please help.
Thanks,