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

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
 
V

Vasant Nanavati

Workbooks.Add sTemplateLocation

where sTemplateLocation is the string pointing to the template address.

______________________________________________________________________
 
D

Dave Peterson

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")
 
J

jimc

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

Top