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!!
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!!
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
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!!
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" <[email protected]> wrote in message
news:[email protected]...
> 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!!
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks