Hi,
Does someone know how to change the code to specify worksheet 'Template' instead of active sheet?
Thanks
Does someone know how to change the code to specify worksheet 'Template' instead of active sheet?
Thanks
Code:
Sub Create()
Dim i As Long
Dim xNumber As Integer
Dim xName As String
Dim xActiveSheet As Worksheet
On Error Resume Next
Application.ScreenUpdating = False
Set xActiveSheet = ActiveSheet
xNumber = InputBox("Enter number of times to copy the current sheet")
For i = 1 To xNumber
xName = ActiveSheet.Name
xActiveSheet.Copy After:=ActiveWorkbook.Sheets(xName)
ActiveSheet.Name = "R-" & i
Next
xActiveSheet.Activate
Application.ScreenUpdating = True
Call ListSheets
End Sub