amircse0711
New Member
- Joined
- Jul 22, 2019
- Messages
- 25
Hello Everyone ,
I have created a macro to copy the active worksheet and paste a new one.
I want to make a slight modification to it : The newly created worksheet to be pasted on the left side of the workbook rather than on the right (My team is used to this format).
Dim sName As String
Dim i As Integer
i = ActiveWorkbook.Worksheets.Count
sName = Application.InputBox("Enter a name for the new sheet", "Add sheet")
If sName = "" Then Exit Sub
Worksheets(1).Copy after:=Worksheets(i)
ActiveSheet.Name = sName
Please tell me this is possible. Effort is much appreciated
I have created a macro to copy the active worksheet and paste a new one.
I want to make a slight modification to it : The newly created worksheet to be pasted on the left side of the workbook rather than on the right (My team is used to this format).
Dim sName As String
Dim i As Integer
i = ActiveWorkbook.Worksheets.Count
sName = Application.InputBox("Enter a name for the new sheet", "Add sheet")
If sName = "" Then Exit Sub
Worksheets(1).Copy after:=Worksheets(i)
ActiveSheet.Name = sName
Please tell me this is possible. Effort is much appreciated
Last edited: