gsgriffin
Technical User
- Oct 17, 2002
- 27
I've recorded a sort into a macro and then placed into code so as to allow me to easily perform a sort and then an "un-sort".
When I perform the sort manually, everything works great. When the sort is repeated by the macro, I get a "Z" in the top-left cell of the sort area when the sort completes. When unsorting, a value of "M" is placed in the top-left cell.
I can't figure out what part of this code is causes the code to return a value.
Rows(SortArea).Select
Selection.Sort Key1:=Range("I6"
, Order1:=xlAscending, Key2:=Range("H6"
_
, Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom
Ideas?
When I perform the sort manually, everything works great. When the sort is repeated by the macro, I get a "Z" in the top-left cell of the sort area when the sort completes. When unsorting, a value of "M" is placed in the top-left cell.
I can't figure out what part of this code is causes the code to return a value.
Rows(SortArea).Select
Selection.Sort Key1:=Range("I6"
, Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom
Ideas?