PC Review


Reply
Thread Tools Rate Thread

Create a new Sheet Q

 
 
Seanie
Guest
Posts: n/a
 
      5th Nov 2008
The following is an extract of some code that creates a new sheet
after the activesheet. How could I tweak to insert this new sheet
after the sheet called "Start" - this sheet called Start is actual
just to the right of the active sheet, to the new sheet I wish to
create will now be to the right of the sheet called "Start" and thus 2
sheets to the right of the active sheet

Thanks


If SheetExists(newShtName) Then
MsgBox "You have already created this week.If you have made an
error, delete the week sheet tab and e-mail again", vbCritical
Exit Sub
End If
ActiveSheet.Copy after:=ActiveSheet
ActiveSheet.Name = newShtName
ActiveSheet.Tab.ColorIndex = -4142
 
Reply With Quote
 
 
 
 
Mike H
Guest
Posts: n/a
 
      5th Nov 2008
Try this

ActiveSheet.Copy after:=Sheets("Start")

Mike

"Seanie" wrote:

> The following is an extract of some code that creates a new sheet
> after the activesheet. How could I tweak to insert this new sheet
> after the sheet called "Start" - this sheet called Start is actual
> just to the right of the active sheet, to the new sheet I wish to
> create will now be to the right of the sheet called "Start" and thus 2
> sheets to the right of the active sheet
>
> Thanks
>
>
> If SheetExists(newShtName) Then
> MsgBox "You have already created this week.If you have made an
> error, delete the week sheet tab and e-mail again", vbCritical
> Exit Sub
> End If
> ActiveSheet.Copy after:=ActiveSheet
> ActiveSheet.Name = newShtName
> ActiveSheet.Tab.ColorIndex = -4142
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create new sheets based off Data sheet, and template sheet Midget Microsoft Excel Programming 2 1st May 2007 09:55 PM
create a formula in one sheet that would read data from separate sheet automatically QD Microsoft Excel Misc 0 8th Dec 2006 04:17 AM
Pick projects from sheet and create new sheet per project GregR Microsoft Excel Programming 4 6th Feb 2006 05:51 PM
How do I create a command button to jump from sheet to sheet in a. =?Utf-8?B?RGFybGVuZXc=?= Microsoft Excel Worksheet Functions 3 22nd Mar 2005 10:36 PM
How do I create a sheet of Avery file folder labels-sheet size 836 =?Utf-8?B?TWFuaWM2Nw==?= Microsoft Word Document Management 7 19th Mar 2005 08:08 PM


Features
 

Advertising
 

Newsgroups
 


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