Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank YOU Sir,
It worked! "Toppers" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy from one Sheet and paste on another sheet based on condition | Excel Discussion (Misc queries) | |||
How do I distribute a template created with Template Wizard ? | Excel Discussion (Misc queries) | |||
Active Cell Copy And Paste Sheet to Sheet | New Users to Excel | |||
in VBA Sheets("mysheet").Copy Befo=Sheets(1) how do i get a reference to the newly created copy of this sheet? | Excel Worksheet Functions | |||
new sheet created 'on the fly' from template in same workbook - H. | Excel Worksheet Functions |