Add a sheet using a template

N

Newbie

Hi,

I am adding a sheet using sheets.add.name = sname - no problem

However, I would like the newly created WORKSHEET to be based on a template.
Is this possible? if yes, how?

Thanks
 
N

Newbie

NB I don't want the worksheet to be the default for all workbooks only the
workbook that I am adding the sheet to
 
P

Pete McCosh

One way, if what you're doing is regularly adding a new
sheet to an existing workbook.

Create your template worksheet, place it right at the end
of the workbook, then hide it or, if you're concerned
about other users finding it and messing about with it use

Sheets("Template").visible = xlveryhidden

Then, to create a new copy:

Sheets("Template").visible = true
Sheets("Template").copy before:= Sheets("Template")
Activesheet.name = "NewSheetName"
Sheets("Template").visible = xlveryhidden

Cheers, Pete
 
N

Newbie

Thanks works a treat!
Pete McCosh said:
One way, if what you're doing is regularly adding a new
sheet to an existing workbook.

Create your template worksheet, place it right at the end
of the workbook, then hide it or, if you're concerned
about other users finding it and messing about with it use

Sheets("Template").visible = xlveryhidden

Then, to create a new copy:

Sheets("Template").visible = true
Sheets("Template").copy before:= Sheets("Template")
Activesheet.name = "NewSheetName"
Sheets("Template").visible = xlveryhidden

Cheers, Pete
 
Top