PDA

View Full Version : add template as new sheet



photon_ed
05-04-2006, 04:46 AM
Hello, could someone please let me know the vba codes for adding a template as a new sheet in a workbook.
Thank you

yours,
Ed

lucas
05-04-2006, 06:25 AM
I used the macro recorder to make this:

Sub Macro1()
Workbooks.Add Template:= _
"F:\Program Files\Microsoft Office\Templates\1033\ExpenseStatement.xlt"
Application.Run "checkname"
End Sub


but that opens a new book.....

this kb entry will let you have a hidden template sheet that will autonumber the sheets as you add it to the workbook, sounds more like what your looking for maybe....
http://vbaexpress.com/kb/getarticle.php?kb_id=803

photon_ed
05-04-2006, 07:29 AM
Thank you VeRy much, i will give it a go when i get the chance to :)
yours,
Ed