Excel Help

quakeworld

Senior member
Aug 5, 2009
222
0
76
Hi,

Is there a way to specify what position (left or right) a worksheet opens using sheets.add.name ? Say for example, I always want a new worksheet to open to the right of 'Sheet1'..

Thanks.
 

mayest

Senior member
Jun 30, 2006
306
0
0
You can do this:

Public Sub NewSheetFirst()
ActiveWorkbook.Sheets.Add Before:=Sheets(1)
End Sub

That will add a new worksheet before the first. You can also use After:= and you can specify a specific sheet name.