Adding a new sheet based on a template

  • Thread starter Thread starter JVZ
  • Start date Start date
J

JVZ

I need to add a new worksheet using the VBA ADD method. How can I specify
the worksheet template I want to base the worksheet on?

Thanks, and sorry for my english
 
Use this

Sheets.Add Type:=Application.TemplatesPath & "\xxxxx.xlt"
 
I am not sure you can do it with ADD, but

set wkbk = workbooks.open( filename:= _
"C:\MyTemplates\Workbook1.xls")
wkbk.Worksheets(1).copy After:=thisworkbook.Worksheets( _
thisworkbook.Worksheets.count)

wkbk.close Savechanges:=False
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top