Solution for Need to copy a certain sheet to the amount of the value on InputBox

Hi Dear,
Please find attached..
Sub testing()
Dim i As Integer
Dim wkb As Workbook
Dim sh As Worksheet
Set wkb = ThisWorkbook
Set sh = wkb.Sheets("template")
i = VBA.InputBox("Enter a Number")
k = 1
For j = 1 To i
wkb.Sheets("template").Copy after:=Sheets(Sheets.Count)
Set nsh = ActiveSheet
nsh.Name = "New Sheet" & k
k = k + 1
Next j
MsgBox "Done", vbInformation
End Sub
Thanks & regards,
| Attachment | Size |
|---|---|
| Need to copy a certain sheet to the amount of the value on InputBox.xlsm | 18.37 KB |

Recent comments
6 years 36 weeks ago
7 years 22 weeks ago
7 years 34 weeks ago
7 years 37 weeks ago
7 years 38 weeks ago
7 years 43 weeks ago
7 years 51 weeks ago
8 years 1 day ago
8 years 1 day ago
8 years 2 days ago