F
Freddy
I have read other post concerning sorting with macros, but I cannot find any
information as to why my code will not work. I am receiving the error message
“Run-time error ‘1004’:
The sort reference is not valid. Make sure that it’s within the data you
want to sort, and the first Sort By box isn’t the same or blank.â€
The sort code and the worksheet selection code is below. Does anyone have
any suggestions?
Thanks!
Worksheets("75851_Plasticity_All").Range("A:B").Select
Selection.Sort Key1:=Range("A2"), Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
information as to why my code will not work. I am receiving the error message
“Run-time error ‘1004’:
The sort reference is not valid. Make sure that it’s within the data you
want to sort, and the first Sort By box isn’t the same or blank.â€
The sort code and the worksheet selection code is below. Does anyone have
any suggestions?
Thanks!
Worksheets("75851_Plasticity_All").Range("A:B").Select
Selection.Sort Key1:=Range("A2"), Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal