Adding a new sheet based on a template

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
 
T

Tom Ogilvy

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

Top