I am currently creating a macro to improve a weekly file update process. I have to copy a specific range of data from one file (file name "Previous Weeks File") and paste it into my current week file - the new week's file name has date changes: "File Update - 03-17 (Weekly)". How can I copy the data from the "Previous Weeks File" and into the dynamically named workbook I'm updating?
I've tried to use the ThisWorkbook function, but it only works when it's being used in the original file I created the macro in. This macro will be used in a new file every week, so that function isn't a viable solution. I also plan to send this macro to the process owner once it's completed so they can use this to make their weekly update process more time efficient.
I've tried to use the ThisWorkbook function, but it only works when it's being used in the original file I created the macro in. This macro will be used in a new file every week, so that function isn't a viable solution. I also plan to send this macro to the process owner once it's completed so they can use this to make their weekly update process more time efficient.
VBA Code:
Windows("Previous Weeks File.xlsx").Activate
Sheets("Summary").Select
Range("G7:G9").Select
Selection.Copy
ThisWorkbook.Activate
Sheets("Summary").Select
Range("H7:H9").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False