HI,
I have a workbook which i use to register clients (name; address; registration date, etc.). One of the cells uses =concatenate() to generate a unique Id for each client. I want to automate the creation of a personal workbook for each client, using data from the unique Id cell, as the filename for the newly created workbook and save it in a new location. The following code works perfectly to create, name and save the new workbook with the unique Id and in the appropriate folder.
However, workbook created here is based on the Blank Template; what i really want is for the new workbook to be based on an existing template which i have already designed.
Sub AddNew()
Dim wbName As String
wbName = Selection.Value
Dim newBook As Workbook
Set newBook = Workbooks.Add
With newBook
.Title = wbName
.SaveAs filename:="K:\SUPPORT\CHT-Training\TestFilenameFolder\" & wbName, fileFormat:=52
End With
End Sub
I've trawled google search results and youtube and a variety of VBA books in vain for a week now and can't find any working examples of this.
any help would be much appreciated, thanks in advance
Jim
I have a workbook which i use to register clients (name; address; registration date, etc.). One of the cells uses =concatenate() to generate a unique Id for each client. I want to automate the creation of a personal workbook for each client, using data from the unique Id cell, as the filename for the newly created workbook and save it in a new location. The following code works perfectly to create, name and save the new workbook with the unique Id and in the appropriate folder.
However, workbook created here is based on the Blank Template; what i really want is for the new workbook to be based on an existing template which i have already designed.
Sub AddNew()
Dim wbName As String
wbName = Selection.Value
Dim newBook As Workbook
Set newBook = Workbooks.Add
With newBook
.Title = wbName
.SaveAs filename:="K:\SUPPORT\CHT-Training\TestFilenameFolder\" & wbName, fileFormat:=52
End With
End Sub
I've trawled google search results and youtube and a variety of VBA books in vain for a week now and can't find any working examples of this.
any help would be much appreciated, thanks in advance

Jim