ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to open xl and create a new document based on a template (https://www.excelbanter.com/excel-discussion-misc-queries/58363-how-open-xl-create-new-document-based-template.html)

Colin Wilson

How to open xl and create a new document based on a template
 
does anyone know if there is an xl equiv to the word macro "Documents.Add
Template etc, to open a new xls from an xlt - I want to be able to open and
save new xls's without changing the template..

bigwheel

How to open xl and create a new document based on a template
 
Take a look at "Add Method (Workbooks Collection)" in the helpfile. You'll
see that you can specify the template name to be used to create new workbooks
i.e.

Workbooks.Add(Template:= "C:\template.xlt")

"Colin Wilson" wrote:

does anyone know if there is an xl equiv to the word macro "Documents.Add
Template etc, to open a new xls from an xlt - I want to be able to open and
save new xls's without changing the template..


[email protected]

How to open xl and create a new document based on a template
 

Do you mean like

Sub openfromXLT()
Workbooks.Add Template:="my_xltpath"
End Sub

Have you tried to record this action?



All times are GMT +1. The time now is 01:31 AM.

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