christianrwevans
New Member
- Joined
- Jul 6, 2016
- Messages
- 9
Probably an easy one here:
I have recorded simple macros to copy rows from other sheets into a sheet called "Scenario Builder 1". E.g.,:
Sub Thermal_Drying()
Sheets("Thermal Drying").Select
Rows("1:39").Select
Selection.Copy
Sheets("Scenario Builder 1").Select
ActiveCell.Insert Shift:=xlDown
End Sub
However when I make a copy of the sheet (e.g., "Scenario Builder 2"), the macro won't work as the reference is to "Scenario Builder 1". My novice intuition is that I need to define the sheet that hosts the button so that I can return to it to paste the rows, but my searching/skill level has not resulted in success yet.
Figured some of you could probably solve this sleep-walking so: what code should I use to 1) define the button host sheet in a way that returns the focus there to paste, or 2) to accomplish this task using a different approach?
Please and thank-you!
I have recorded simple macros to copy rows from other sheets into a sheet called "Scenario Builder 1". E.g.,:
Sub Thermal_Drying()
Sheets("Thermal Drying").Select
Rows("1:39").Select
Selection.Copy
Sheets("Scenario Builder 1").Select
ActiveCell.Insert Shift:=xlDown
End Sub
However when I make a copy of the sheet (e.g., "Scenario Builder 2"), the macro won't work as the reference is to "Scenario Builder 1". My novice intuition is that I need to define the sheet that hosts the button so that I can return to it to paste the rows, but my searching/skill level has not resulted in success yet.
Figured some of you could probably solve this sleep-walking so: what code should I use to 1) define the button host sheet in a way that returns the focus there to paste, or 2) to accomplish this task using a different approach?
Please and thank-you!