Copy template workbook multiple times and rename based on list?

ironny90

Board Regular
Joined
Mar 29, 2022
Messages
72
Office Version
  1. 2010
Platform
  1. Windows
Hi everyone! I hope everyone is having a good day. I am trying to copy a template workbook (with multiple sheets) multiple times and rename based on a name list. I found the following code, edited it and tested it. But I don't know how to add the template in? I don't just want an empty workbook and rename it. I want it to be copied from an existing template. Many thanks in advance if anyone can help.

VBA Code:
Sub CopyWorkbook()

Dim wbName as String

For i = 1 to 10

wbName = Cells(i, 1).Value

Workbooks.Add

ActiveWorkbook.SaveAs Filename:="C:\Users\Desktop\" & wbName & ".xlsx"

Close

Next i

End Sub
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Just saw this. I think this one solves my problem.
 
Upvote 0

Forum statistics

Threads
1,215,470
Messages
6,124,992
Members
449,201
Latest member
Lunzwe73

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