View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Can I add a new worksheet using a template

John,
If the template has only one sheet:

Workbooks.Open "C:\Program Files\Bourret Tools\_POTemplate.xlt"
Worksheets(1).Move after:=ThisWorkbook.ActiveSheet
Set newsheet = ActiveSheet


HTH,
Bernie
MS Excel MVP


"John" wrote in message ...
I have a formatted excel file with cell formatting plus an inserted bitmap
logo saved on my system as PO Template.xls

Can I add a worksheet using that file as a template?

Set newsheet = MasterWorkBook.Worksheets.Add("C:\Program Files\Bourret
Tools\_POTemplate.xlt")

VBA help says "If you are inserting a sheet based on an existing template,
specify the path to the template. The default value is xlWorksheet."

So is this valid?...

It doesn't work for me!

newsheet is still nothing after this line