Copying multiple workbooks into 1 template workbook

spammenotspam

New Member
Joined
Apr 1, 2009
Messages
3
Dear All,

this might sounds stupid question for experts here, but i have yet to read useable solutions for my problem.
I have 3 workbooks, each hv different worksheets in them, and i wish to copy them all into 1 template workbook where i send to clients.

I believe this might works, but need further help to troubleshoot them.
Workbooks.open("ABC.xls")
Workbooks("ABC.xls").Sheet1.Select
Workbooks("ABC.xls").Sheet1.Name = "9. AAA"
Workbooks("ABC.xls")Sheet2.Select
Workbooks("ABC.xls").Sheet2.Name = "10. BBB"
Workbooks("ABC.xls").Sheet3.Select
Workbooks("ABC.xls").Sheet3.Name = "11. CCC"
Workbooks("ABC.xls").Sheets(Array("9. AAA", "10. BBB", "11. CCC")).Copy Before:=Workbooks(final workbook_ddmmyyyy.xls").Sheets(18)
Workbooks("ABC.xls").close

This code should resides in destination/template workbook called Final workbook_ddmmyy.xls, and tries to copy worksheets from ABC.xls or other 2 xls files within same folder.

the issue with up there is, I want the save destination file name to be variable, as the name of the file would change on daily basis, and i do not want to edit my macros on daily basis for that particular destination file name only.

Please help instruct. Your help is greatly appreciated.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
it's not gonna work?
how about, i want to save as a workbook as workbook name +today's date in ddmmyyyy format?.. please help. thanks
 
Upvote 0

Forum statistics

Threads
1,215,014
Messages
6,122,697
Members
449,092
Latest member
snoom82

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top