ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Add a sheet using a template (https://www.excelbanter.com/excel-programming/295026-add-sheet-using-template.html)

Newbie

Add a sheet using a template
 
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



Newbie

Add a sheet using a template
 
NB I don't want the worksheet to be the default for all workbooks only the
workbook that I am adding the sheet to
"Newbie" wrote in message
...
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





Pete McCOsh

Add a sheet using a template
 
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 befo= Sheets("Template")
Activesheet.name = "NewSheetName"
Sheets("Template").visible = xlveryhidden

Cheers, Pete

-----Original Message-----
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


.


Newbie

Add a sheet using a template
 
Thanks works a treat!
"Pete McCosh" wrote in message
...
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 befo= Sheets("Template")
Activesheet.name = "NewSheetName"
Sheets("Template").visible = xlveryhidden

Cheers, Pete

-----Original Message-----
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


.





All times are GMT +1. The time now is 07:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com