View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default Copy/paste the template whenever new sheet is created

Hi,

Try:

Private Sub Workbook_NewSheet(ByVal Sh As Object)

Sheets("KPI Certificate Template").Range("B6:G47").Copy Sh.Range("B3")

End Sub


HTH

"Telecommm" wrote:

Hi Amigos,
I have a standard template in a sheet named "KPI Certificate Template'
I want to paste this template to every new sheet whenever created. How can I
make the following Macro generic so that it works for every sheet.
Thanks for the help.


Private Sub Workbook_NewSheet(ByVal Sh As Object)
'
' autocpy Macro
' Macro recorded 28/12/2005 by Junaid Tahir
'

'
Sheets("KPI Certificate Template").Select
Range("B6:G47").Select
Selection.Copy
Sheets(Sheet4).Select
Range("B3").Select
ActiveSheet.Paste
End Sub