how to create a new workbook based on a template...

  • Thread starter Thread starter jimc
  • Start date Start date
J

jimc

I would like to create a new workbook based on a template, but not the
xlstart template. In other words I dont want to use a default but be
able to specify the template file when creating the workbook. Is this
possible? Same question with worksheets.

Jim
 
Workbooks.Add sTemplateLocation

where sTemplateLocation is the string pointing to the template address.

______________________________________________________________________
 
dim wkbk as workbook
set wkbk = Workbooks.Add(template:="C:\my documents\excel\mybook.xlt")

and

Dim wks as object
set wks = sheets.add(Type:="C:\my documents\excel\mysheet.xlt")
 
Thanks you very much

Workbooks.Add sTemplateLocation

where sTemplateLocation is the string pointing to the template address.

______________________________________________________________________
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top