Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sheets("Sheet1").Cells.ClearContents | Excel Discussion (Misc queries) | |||
Sheets("Sheet1").Move After:=Sheets(2) | Excel Programming | |||
use variable in Workbooks("book1").Worksheets("sheet1").Range("a1" | Excel Programming | |||
Sheets("sheet1").Range command between workbooks | Excel Programming | |||
Sheet1 object not Worksheets("Sheet1") | Excel Programming |