ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to create a new workbook based on a template... (https://www.excelbanter.com/excel-programming/391457-how-create-new-workbook-based-template.html)

jimc

how to create a new workbook based on a template...
 
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


Vasant Nanavati

how to create a new workbook based on a template...
 
Workbooks.Add sTemplateLocation

where sTemplateLocation is the string pointing to the template address.

__________________________________________________ ____________________

"jimc" wrote in message
ups.com...
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




Dave Peterson

how to create a new workbook based on a template...
 
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")





jimc wrote:

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


--

Dave Peterson

jimc

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


Thanks you very much

On Jun 16, 9:45 pm, "Vasant Nanavati" <vasantn AT aol DOT com wrote:
Workbooks.Add sTemplateLocation

where sTemplateLocation is the string pointing to the template address.

__________________________________________________ ____________________

"jimc" wrote in message

ups.com...

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





All times are GMT +1. The time now is 11:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com