Monday, November 12, 2007

"add sheets after". How to add sheets in excel

Hi people. if you have the problem that excel always create new sheets at the left side of the current one, you have to try this script. just add it to your personal vba module and make a shortcut for the keyboard.

the code is:

Sub add_sheets_after()
Dim mySheet As String
Dim myNewSheet As String
mySheet = ActiveSheet.Name
myNewSheet = ActiveSheet.Name
Sheets(myNewSheet).Move After:=Sheets(Sheets.Count)
End Sub

No comments: