Guitarmageddon
Board Regular
- Joined
- Dec 22, 2014
- Messages
- 159
Hello everyone,
I am trying to write a macro to basically take a range from one tab (lets say, its always named "SOURCE" tab) and past it into another tab (lets call it "DESTINATION"). The sheet names are always fixed.
I want to be able to simply copy down columns A:Z of SOURCE, and paste it into A1 of DESTINATION sheet. My table in SOURCE will always be columns A:Z, but could be lets say 2,000 lines for one user, but another user may need 20,000 lines for example. So I basically just want it to copy down to the end of the data dynamically and just paste it over.
I came up with this, but got a debug error.
I think because writing it that way forces me to call it up when I am physically in that sheet? Any help would be appreciated Im sure this is super simple. Doing this via linked cells forced it into a "calculating" tailspin and was really time consuming. Thanks!
I am trying to write a macro to basically take a range from one tab (lets say, its always named "SOURCE" tab) and past it into another tab (lets call it "DESTINATION"). The sheet names are always fixed.
I want to be able to simply copy down columns A:Z of SOURCE, and paste it into A1 of DESTINATION sheet. My table in SOURCE will always be columns A:Z, but could be lets say 2,000 lines for one user, but another user may need 20,000 lines for example. So I basically just want it to copy down to the end of the data dynamically and just paste it over.
I came up with this, but got a debug error.
VBA Code:
Columns("A:Z").Select
Selection.Copy
Sheets("DESTINATION").Select
ActiveSheet.Paste
End Sub
I think because writing it that way forces me to call it up when I am physically in that sheet? Any help would be appreciated Im sure this is super simple. Doing this via linked cells forced it into a "calculating" tailspin and was really time consuming. Thanks!