LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,089
Default Macro REQ: Automatically copy a template sheet and rename

I'll take that as a "yes". You're welcome. Thanks for the feedback.

Anyway, I think if you look closely, most of the code is from your original.

Regards

Trevor


"MCSmarties" wrote in message
oups.com...
Awesome macro Trevor, many thanks!

On Oct 10, 4:34 pm, "Trevor Shuttleworth"
wrote:
OK, maybe this will do what you need:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim DestWs As Worksheet
If Me.Name < "Template" Then Exit Sub
If IsEmpty(Target.Value) Then Exit Sub
If Intersect(Target, Range("F3")) Is Nothing Then Exit Sub

Sheets("template").Copy after:=Sheets(Sheets.Count)
Set DestWs = ActiveSheet
On Error Resume Next
DestWs.Name = Range("F3").Value
On Error GoTo 0

Application.EnableEvents = False
Target.Value = "" ' clear template
Application.EnableEvents = True
End Sub

Regards

Trevor

<snip



 
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
macro to: Add new sheet, then rename new sheet with todays date Paul Excel Worksheet Functions 3 September 29th 07 03:17 AM
How do I automatically rename a sheet from the summary page? Aaron Excel Worksheet Functions 1 September 13th 06 04:50 PM
automatically making a copy of a sheet starguy Excel Worksheet Functions 2 April 22nd 06 06:37 AM
Copy/Rename a sheet DK Links and Linking in Excel 1 March 20th 06 05:36 AM
How do I automatically rename a sheet with the contents of a cell. michaelspearin Excel Discussion (Misc queries) 3 December 3rd 04 09:27 PM


All times are GMT +1. The time now is 02:50 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"