I'm trying to clean up my code and remove all the activates and selects that are in there from my novice use of the macro recorder. Just when I think I understand something, apparently I don't.
This bit of code in my macro works perfectly:
Worksheets(DEName).Activate
Range("A13").Select
Range(Selection, Selection.SpecialCells(xlLastCell)).Copy
Worksheets(CrunchName).Activate
Range("A1").PasteSpecial (xlPasteValues)
So, I thought I'd be clever and tighten it up. But, my attempt at doing so generates a 1004 error on the copy line:
Worksheets(DEName).Range("A13", Range("A13").SpecialCells(xlLastCell)).Copy
Worksheets(CrunchName).Range("A1").PasteSpecial (xlPasteValues)
Any help and/or explanation of what I'm doing wrong would be greatly appreciated.