Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Change Order of Inserted Worksheets

Everytime I add a worksheet, it appears in front of the current worksheet.
How do I get them to appear after the current worksheet? Thanks!!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Change Order of Inserted Worksheets

Hi Lilbit,

Everytime I add a worksheet, it appears in front of the current
worksheet.
How do I get them to appear after the current worksheet? Thanks!!


Try:

Worksheets.Add , After:=Sheets(ActiveSheet.Index)


---
Regards,
Norman


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Change Order of Inserted Worksheets

I've tried adding it in several locations, but I keep getting an error
message. Where would I put it in the following code (P.S. -- There is
already a Sheet1 worksheet. Right now, the result of the macro is Stage3,
Stage4, Stage5, Sheet1. I want Sheet1, Stage3, Stage4, Stage5):
Sheets.Add
Sheets("Sheet2").Select
Sheets("Sheet2").Name = "Stage5"
Sheets.Add
Sheets("Sheet3").Select
Sheets("Sheet3").Name = "Stage4"
Sheets.Add
Sheets("Sheet4").Select
Sheets("Sheet4").Name = "Stage3"

Thanks!!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Change Order of Inserted Worksheets

Hi Lilbit,

Try:

'=============
Public Sub Tester001()
Dim i As Long

For i = 5 To 3 Step -1
Worksheets.Add , after:=Sheets("Sheet1")
ActiveSheet.Name = "Stage" & i
Next i

End Sub
'<<=============


---
Regards,
Norman



"Lilbit" wrote in message
lkaboutsoftware.com...
I've tried adding it in several locations, but I keep getting an error
message. Where would I put it in the following code (P.S. -- There is
already a Sheet1 worksheet. Right now, the result of the macro is Stage3,
Stage4, Stage5, Sheet1. I want Sheet1, Stage3, Stage4, Stage5):
Sheets.Add
Sheets("Sheet2").Select
Sheets("Sheet2").Name = "Stage5"
Sheets.Add
Sheets("Sheet3").Select
Sheets("Sheet3").Name = "Stage4"
Sheets.Add
Sheets("Sheet4").Select
Sheets("Sheet4").Name = "Stage3"

Thanks!!



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 change series plotting order without changing legend order? PatrickM Charts and Charting in Excel 6 December 2nd 09 07:43 PM
How many worksheets can be inserted in one workbook? Bobby New Users to Excel 1 May 10th 08 07:31 AM
how do I change the order of worksheets in a workbook DanielLipkie Excel Discussion (Misc queries) 2 July 9th 07 08:26 PM
How do I change the order of worksheets in a workbook DanielLipkie Excel Discussion (Misc queries) 1 July 9th 07 07:37 PM
Tab Name Change Error .xls] inserted Alayna Excel Discussion (Misc queries) 1 June 14th 05 01:31 PM


All times are GMT +1. The time now is 03:38 PM.

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"