Sheet name : “sheet_name.xls”
This “sheet_name.xls” has the following page
Path sheet_name Range to copy
C:\sheet_name2.xls sheet 2A a1:a2
C:\sheet_name3.xls sheet 3b a1:c3
C:\sheet_name.xls sheet 5a
I want to be able to change data above and my code will
not have to be hard coded as it is.
wb2 = "C:\sheet_name2.xls"
Application.Workbooks.Open (wb2)
Windows("sheet_name2.xls"

.Activate
Sheets("sheet 2A "

.Select
Range("a1:a2"

.Select
Selection.Copy
Windows("C:\sheet_name.xls"

.Activate
Sheets("sheet 5a"

.Select
ActiveWindow.LargeScroll ToRight:=-6
ActiveWindow.ScrollColumn = 1
Range("G23"

.Select
ActiveSheet.Paste
Windows("sheet_name2.xls "

.Activate
ActiveWorkbook.Save
ActiveWindow.Close
Repeat…