Moving data from master sheet to new sheets
You could also store the sheet template as SHEET.XLT in your xlstart folder and
add/insert to new books by using this code.
Sub Add_Sheets11()
'uses SHEET.XLT if one available in xlstart folder
'otherwise uses default sheet
For i = 2 To 1 Step -1
Sheets.Add(Type:="Worksheet").Name = "mynewsheet" & i
Next
End Sub
Gord Dibben MS Excel MVP
On Fri, 4 May 2007 20:09:08 -0400, "Bernie Deitrick" <deitbe @ consumer dot org
wrote:
Ryan,
The Workbooks.Add method allows you to specify the template: save your
template file as a template (xlt extension) then use
Workbooks.Add "C:\Folderpath\Template.xlt"
If you want to use a specific worksheet, you could store the worksheet in
the file with the macro, then copy that sheet and add the copy to the new
workbook as the basis of your sheets.
HTH,
Bernie
MS Excel MVP
Here is the current code I am working with,
and I want to use a template sheet called "TEMPLATE". Thanks again
for all your help Bernie!
|