M
matthew.a.lawless
I have some code that works from a keyboard shortcut, but when I try
to attach it to a command button on another worksheet is delivers the
above error. Code is below, please help!
Sheets("Table").Activate
Range("E5:M17").Select
Selection.Sort Key1:=Range("M6"), Order1:=xlDescending,
Key2:=Range("L6") _
, Order2:=xlDescending, Key3:=Range("J6"),
Order3:=xlDescending, Header _
:=xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom _
, DataOption1:=xlSortNormal, DataOption2:=xlSortNormal,
DataOption3:= _
xlSortNormal
Range("A1").Select
to attach it to a command button on another worksheet is delivers the
above error. Code is below, please help!
Sheets("Table").Activate
Range("E5:M17").Select
Selection.Sort Key1:=Range("M6"), Order1:=xlDescending,
Key2:=Range("L6") _
, Order2:=xlDescending, Key3:=Range("J6"),
Order3:=xlDescending, Header _
:=xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom _
, DataOption1:=xlSortNormal, DataOption2:=xlSortNormal,
DataOption3:= _
xlSortNormal
Range("A1").Select