Home |
Search |
Today's Posts |
#1
|
|||
|
|||
new sheet created 'on the fly' from template in same workbook - H.
looking for an excel solution to create a new sheet at the end based on the
contents of a template sheet within the same workbook. |
#2
|
|||
|
|||
One way:
Worksheets("template").Copy _ after:=Worksheets(Worksheets.Count) MrT wrote: looking for an excel solution to create a new sheet at the end based on the contents of a template sheet within the same workbook. -- Dave Peterson |
#3
|
|||
|
|||
Thankyou Dave
Could you help with another question? I am very new to excel and am trying to build a tool to help me define tasks in my work day schedule. Now I can create a new sheet 'on the fly' How would I copy the contents of a cell in an existing sheet to a cell on the new sheet; and How would i rename the new sheet based on cell contents? MrT "Dave Peterson" wrote: One way: Worksheets("template").Copy _ after:=Worksheets(Worksheets.Count) MrT wrote: looking for an excel solution to create a new sheet at the end based on the contents of a template sheet within the same workbook. -- Dave Peterson |
#4
|
|||
|
|||
It's probably best to just start a new thread for different questions. And I
think it's better to address any question to the whole world--not just one person. You'll usually get a quicker response than waiting for any particular person. But this worked ok for me: Option Explicit Sub testme() Dim newWks As Worksheet Dim TemplateWks As Worksheet Dim OtherWks As Worksheet Set TemplateWks = Worksheets("template") Set OtherWks = Worksheets("othersheet") TemplateWks.Copy _ after:=Worksheets(Worksheets.Count) 'the new sheet is now the activesheet Set newWks = ActiveSheet With newWks OtherWks.Range("a1").Copy _ Destination:=.Range("a1") On Error Resume Next .Name = .Range("a1").Value If Err.Number < 0 Then 'rename didn't work MsgBox "Please rename: " & .Name & " manually" Err.Clear End If On Error GoTo 0 End With End Sub (I copied and pasted from A1 to A1--but you can change either/both address.) MrT wrote: Thankyou Dave Could you help with another question? I am very new to excel and am trying to build a tool to help me define tasks in my work day schedule. Now I can create a new sheet 'on the fly' How would I copy the contents of a cell in an existing sheet to a cell on the new sheet; and How would i rename the new sheet based on cell contents? MrT "Dave Peterson" wrote: One way: Worksheets("template").Copy _ after:=Worksheets(Worksheets.Count) MrT wrote: looking for an excel solution to create a new sheet at the end based on the contents of a template sheet within the same workbook. -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is there a time sheet template that calculates hours? | Excel Discussion (Misc queries) | |||
How do I print pages 2 & 3 with the Price Sheet template? | Excel Worksheet Functions | |||
How do I use a template after I've created it? | Excel Worksheet Functions | |||
Function to automatically insert a new sheet as a result of data entry? | Excel Worksheet Functions | |||
Naming & renaming a sheet tab | Excel Worksheet Functions |