Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Copy/paste the template whenever new sheet is created

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   Report Post  
Posted to microsoft.public.excel.programming
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Copy/paste the template whenever new sheet is created

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy from one Sheet and paste on another sheet based on condition Prem Excel Discussion (Misc queries) 2 December 24th 07 05:05 AM
How do I distribute a template created with Template Wizard ? Sofia Excel Discussion (Misc queries) 0 June 20th 07 04:51 PM
Active Cell Copy And Paste Sheet to Sheet A.R.J Allan Jefferys New Users to Excel 4 May 4th 06 02:04 AM
in VBA Sheets("mysheet").Copy Befo=Sheets(1) how do i get a reference to the newly created copy of this sheet? Daniel Excel Worksheet Functions 1 July 6th 05 09:57 PM
new sheet created 'on the fly' from template in same workbook - H. MrT Excel Worksheet Functions 3 April 10th 05 08:30 PM


All times are GMT +1. The time now is 10:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"