OutlawoftheMarsh
New Member
- Joined
- Dec 11, 2003
- Messages
- 35
I'm on Sheet1. I need to sort the data on Sheet2 without leaving Sheet1. When Sheet2 is the active sheet, my macro runs fine. When Sheet 1 is the active sheet, I get a 1004 error. I have no idea what that means. Here's my code:
Sheets("Sheet2").Columns("A:C").Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
I'm not sure which part is wrong, but I think it might have something to do with the Range("A1") part.
Thanks,
Outlaw
Sheets("Sheet2").Columns("A:C").Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
I'm not sure which part is wrong, but I think it might have something to do with the Range("A1") part.
Thanks,
Outlaw