insert worksheet

  • Thread starter Thread starter Sue
  • Start date Start date
S

Sue

The default for inserting a new worksheet is to the left.
Is there a way to have worksheets inserted to the right?
 
Hi Sue
in VBA you could use the following macro:
sub insert_after()
ActiveWorkbook.Sheets.Add After:=ActiveSheet
end sub

you may apply a button to this macro.
 
put this macro in your personal.xls file and attach it to a keyboard
shortcut or toolbar button.


Public Sub InsertSheetToRight()
If ActiveWindow.SelectedSheets.Count > 1 Then
MsgBox _
"This function does not work with multiple sheets selected"
Else
Worksheets.Add After:=Sheets(ActiveSheet.Index)
End If
End Sub


If you're not familiar with macros, see David McRitchie's "Getting
Started with Macros":

http://www.mvps.org/dmcritchie/excel/getstarted.htm
 
Back
Top