Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 202
Default Create a new Sheet Q

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Create a new Sheet Q

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Create a new Sheet Q


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:=Sheets("Start")
ActiveSheet.Name = newShtName
ActiveSheet.Tab.ColorIndex = -4142


--
The Code Cage Team

Regards,
The Code Cage Team
www.thecodecage.com
------------------------------------------------------------------------
The Code Cage Team's Profile: http://www.thecodecage.com/forumz/member.php?userid=2
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=25369

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
How to create Login & Log out Spread sheet in Excel with automated Attendance sheet marc5354 Excel Worksheet Functions 2 September 21st 10 04:22 PM
Create new sheets based off Data sheet, and template sheet Midget Excel Programming 2 May 1st 07 09:55 PM
create a formula in one sheet that would read data from separate sheet automatically QD Excel Discussion (Misc queries) 0 December 8th 06 04:17 AM
How do I create a command button to jump from sheet to sheet in a. Darlenew Excel Worksheet Functions 3 March 22nd 05 10:36 PM
How to create a Macro to Copy Information in one sheet to another sheet. poppy Excel Programming 3 July 28th 04 07:26 AM


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

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

About Us

"It's about Microsoft Excel"