How to control the Sheet tab position

B

Bobby

Hi, how can I control the position of a Sheets when adding one? For
instance
always before "SHEET1".
Thank's in advance.

Sheets.Add
ActiveSheet.Name = "TMP"
 
B

Bobby

Bobby said:
Hi, how can I control the position of a Sheets when adding one? For
instance
always before "SHEET1".
Thank's in advance.

Sheets.Add
ActiveSheet.Name = "TMP"
Bobby, this is how you do it!
Sheets("TMP").Select
Sheets("TMP").Move Before:=Sheets(1)
or
Sheets("TMP").Move After:=Sheets(1)
 
G

Gord Dibben

When adding a new sheet........

Sub SheetAdd()
Sheets.Add Before:=Sheets("Sheet1")
End Sub


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top