![]() |
Sheets("sheet1").Copy
Sheets("sheet1").Copy
This line of code copies the sheet1 to a new workbook useing the default template. Is there a way to put into the code and tell excel which template to use. I want to avoid changing everyone default template. |
Sheets("sheet1").Copy
What do you mean by default template??? That line of code copies the sheet
with tab name "sheet1" from the active workbook to a new workbook. -- HTH... Jim Thomlinson "Little Penny" wrote: Sheets("sheet1").Copy This line of code copies the sheet1 to a new workbook useing the default template. Is there a way to put into the code and tell excel which template to use. I want to avoid changing everyone default template. |
Sheets("sheet1").Copy
I don't understand.
This'll copy that sheet1 to a new workbook--there's no template involved (no workbook template and no worksheet template). Little Penny wrote: Sheets("sheet1").Copy This line of code copies the sheet1 to a new workbook useing the default template. Is there a way to put into the code and tell excel which template to use. I want to avoid changing everyone default template. -- Dave Peterson |
Sheets("sheet1").Copy
Are you thinking of Word where there is a Normal.dot file. XL has nothing
similar... -- HTH... Jim Thomlinson "Jim Thomlinson" wrote: What do you mean by default template??? That line of code copies the sheet with tab name "sheet1" from the active workbook to a new workbook. -- HTH... Jim Thomlinson "Little Penny" wrote: Sheets("sheet1").Copy This line of code copies the sheet1 to a new workbook useing the default template. Is there a way to put into the code and tell excel which template to use. I want to avoid changing everyone default template. |
Sheets("sheet1").Copy
I ceated a excel tempalte the include serveral macro.
I want to be able use Sheets("sheet1").Copy But have excel use the template to open the new workbook On Mon, 17 Sep 2007 13:45:50 -0500, Dave Peterson wrote: I don't understand. This'll copy that sheet1 to a new workbook--there's no template involved (no workbook template and no worksheet template). Little Penny wrote: Sheets("sheet1").Copy This line of code copies the sheet1 to a new workbook useing the default template. Is there a way to put into the code and tell excel which template to use. I want to avoid changing everyone default template. |
Sheets("sheet1").Copy
Create a new workbook that uses that template.
Copy the worksheet into that workbook. Dim NewWkbk As Workbook Dim WksToCopy As Worksheet Set WksToCopy = ActiveWorkbook.Worksheets("Sheet1") Set NewWkbk = Workbooks.Add(template:="C:\folder\yourtemplatenam e.xlt") WksToCopy.Copy _ befo=NewWkbk.Worksheets(1) Little Penny wrote: I ceated a excel tempalte the include serveral macro. I want to be able use Sheets("sheet1").Copy But have excel use the template to open the new workbook On Mon, 17 Sep 2007 13:45:50 -0500, Dave Peterson wrote: I don't understand. This'll copy that sheet1 to a new workbook--there's no template involved (no workbook template and no worksheet template). Little Penny wrote: Sheets("sheet1").Copy This line of code copies the sheet1 to a new workbook useing the default template. Is there a way to put into the code and tell excel which template to use. I want to avoid changing everyone default template. -- Dave Peterson |
All times are GMT +1. The time now is 07:03 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com