melodramatic
Board Regular
- Joined
- Apr 28, 2003
- Messages
- 187
- Office Version
- 365
- Platform
- Windows
I am having a tough time getting a sort in my macro. Here's what I currently have:
Which gives me the "Run-time error '1004'" Method 'Range' of object '_Global' failed.
If I run the sort manually, here's what I'm trying to do:
Can someone help me figure out what I'm doing wrong?
Code:
Range("Table1[#All]").Select
ActiveWorkbook.Worksheets("Entry").Sort Key1:=Range("Table1[[#All],[DCN]]"), _
Order1:=xlAscending, _
Key2:=Range("Table1[#All],[Date]]"), _
Order2:=xlAscending, _
SortOn:=xlSortOnValues, _
DataOption2:=xlSortTextAsNumbers, _
Header:=xlYes
Which gives me the "Run-time error '1004'" Method 'Range' of object '_Global' failed.
If I run the sort manually, here's what I'm trying to do:
Can someone help me figure out what I'm doing wrong?