Hi,
I used the following code in a module to sort the fields in a sheet named 'mySheet'. But I get run-time error 1004: method 'range' of object '_worksheet' failed. What's wrong with my code??
mySheet.Range(Cells(8, 1), Cells(84, 30)).Sort Key1:=mySheet.Range("A10"
, Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Thank you!
I used the following code in a module to sort the fields in a sheet named 'mySheet'. But I get run-time error 1004: method 'range' of object '_worksheet' failed. What's wrong with my code??
mySheet.Range(Cells(8, 1), Cells(84, 30)).Sort Key1:=mySheet.Range("A10"
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Thank you!