Question : Excel - Automatically copy a worksheet template to a new worksheet

I have a template of a table in excel that will form part of a multiple worksheet document. What i would like is that once i have added the reference details as a "Header" for the templte to be able to be automatically recareated a number of times as new worksheets to be filled out about differnt produtcs. So once the first one is filled out having a Macro button (or somthing like that) to press to create a new worksheet with the same table, Header and ready to be filled out again!!! Can this be done?

Answer : Excel - Automatically copy a worksheet template to a new worksheet

This one line of code will copy a sheet named "Template" to the end of the rest of the sheets:

Sheets("Template").Copy after:=Sheets(Sheets.Count)


Here is a sample workbook.  Run the macro...(or just press CTRL + D at the same time)
It will create a new sheet at the end of all the other sheets every time you run the macro..

If you have any more questions, just ask.  One thing to note though, if you put a button on the template sheet to click on to run the macro, then the button will copy to the new sheet also...which is ok if that's what you want...this file does not do that right now though, there is no button yet...

:-)
Albert
Random Solutions  
 
programming4us programming4us