Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding new worksheet BEFORE 1st worksheet
I am calling several macros
the last of which is: Sub summary() Sheets.Add.Name = "1 day moves" Sheets.Add.Name = "3 day moves" End Sub this inserts the 2 new worksheets BEFORE the very last sheet how can I insert these BEFORE a specific worksheet called "template" thank you Rob |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding new worksheet BEFORE 1st worksheet
Try this..
Sheets.Add Befo=Sheets(1) Sheets(1).name = "NewSheet" -- If this post helps click Yes --------------- Jacob Skaria "Rob P" wrote: I am calling several macros the last of which is: Sub summary() Sheets.Add.Name = "1 day moves" Sheets.Add.Name = "3 day moves" End Sub this inserts the 2 new worksheets BEFORE the very last sheet how can I insert these BEFORE a specific worksheet called "template" thank you Rob |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding new worksheet BEFORE 1st worksheet
On Apr 21, 10:41*am, Rob P wrote:
I am calling several macros the last of which is: * * * * * Sub summary() * * * * * * * Sheets.Add.Name = "1 day moves" * * * * * * * Sheets.Add.Name = "3 day moves" * * * * * End Sub this inserts the 2 new worksheets BEFORE the very last sheet how can I insert these BEFORE a specific worksheet called "template" thank you Rob Try this... Sub summary() Sheets.Add.Name = "1 day moves" Sheets.Add.Name = "3 day moves" Sheets("1 day moves").Move Sheets("template") Sheets("3 day moves").Move Sheets("template") End Sub |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding new worksheet BEFORE 1st worksheet
Sorry I thought you are looking to insert as the first sheet. The below will
insert before 'Template' Worksheets.Add(Befo=Worksheets(Sheets("template ").Index)).Name = "MySheet1" -- If this post helps click Yes --------------- Jacob Skaria "Rob P" wrote: I am calling several macros the last of which is: Sub summary() Sheets.Add.Name = "1 day moves" Sheets.Add.Name = "3 day moves" End Sub this inserts the 2 new worksheets BEFORE the very last sheet how can I insert these BEFORE a specific worksheet called "template" thank you Rob |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
adding several worksheet cells onto a main worksheet | Excel Worksheet Functions | |||
Adding worksheet tab names to the first worksheet | Excel Discussion (Misc queries) | |||
list worksheet macros/VBA without adding worksheet | Excel Discussion (Misc queries) | |||
Activate Previous worksheet after adding a new worksheet | Excel Programming | |||
XL VBA adding new worksheet if current worksheet is not empty | Excel Programming |