Deysam
01-02-2020, 03:15 PM
Hello Experts
A very happy New Year 2020 to all of you.
I am creating a new MIS for my team of and need your help on it.
I am using the below code to create the copies of a worksheet named "Master" around 20+ worksheets each month. I have a range of data in another Worksheet named "List of User" (Team members names) in column "K" say "K1:K25".
The below code gives me any number of copies as I wish but, I need the new sheets to be named as per the Range in "List of User" Column "K" and it become dynamic so, that whenever a new name gets added to this list I need not worry while creating copies from the "Master" worksheet.
Public Sub DuplicateSheetMultipleTimes()
Dim n As Integer
On Error Resume Next
n = InputBox("How many copies of the active sheet do you want to make?")
If n >= 1 Then
For numtimes = 1 To n
ActiveSheet.Copy After:=ActiveWorkbook.Sheets(Worksheets.Count)
Next
End If
End Sub
Thanks all in Advance.
A very happy New Year 2020 to all of you.
I am creating a new MIS for my team of and need your help on it.
I am using the below code to create the copies of a worksheet named "Master" around 20+ worksheets each month. I have a range of data in another Worksheet named "List of User" (Team members names) in column "K" say "K1:K25".
The below code gives me any number of copies as I wish but, I need the new sheets to be named as per the Range in "List of User" Column "K" and it become dynamic so, that whenever a new name gets added to this list I need not worry while creating copies from the "Master" worksheet.
Public Sub DuplicateSheetMultipleTimes()
Dim n As Integer
On Error Resume Next
n = InputBox("How many copies of the active sheet do you want to make?")
If n >= 1 Then
For numtimes = 1 To n
ActiveSheet.Copy After:=ActiveWorkbook.Sheets(Worksheets.Count)
Next
End If
End Sub
Thanks all in Advance.