VBA code to add workbook template, paste values and save as

Todd_H

New Member
Joined
Nov 12, 2021
Messages
8
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
Hello,
I am hoping someone could assist.
I wish to automate a large task that i have been assigned. I have a workbook with a list of employee names with their employee ids and dates of birth.
For each employee I need to open an already created workbook template (we can call it Template) which is saved in a location on my computer, the template has 3 tabs and I need to paste the employee id into sheet1 A1 of the template, name into sheet1 B1 of the template and date of birth into sheet1 C1 of the template. I then need to save as the workbook with the file name as employee id and name In another location on my computer.
I then repeat this with the next employee in my list in my workbook until the end of the list.

In my workbook, column A has the employee ids, column B has the name and column C has dates of birth. The list varies in length from month to month.
Is there a code that could do this?

Thanks in advance.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Forum statistics

Threads
1,214,875
Messages
6,122,047
Members
449,064
Latest member
scottdog129

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