copy worksheet multiple times base on user's input

  • Thread starter Thread starter azu_daioh
  • Start date Start date
A

azu_daioh

Im hoping someone could show me how to code this. How do I copy a
worksheet x number of times? The user will have to enter then number
in a cell and upon cell selection change, I want Excel to
automatically copy the worksheet.

Sheet1 = has cell "howMany" (where user would enter the number of
worksheets needed)
Sheet2 = is the worksheet to be copied multiple times


Thanks a bunch


Sharon
 
Sub askforsheetstocopy()
For i = 1 To Range("d1").Value
Sheets("xxx").Copy after:=Sheets(Sheets.Count)
Next i
End Sub

or just ask for input

Sub askforsheetstocopy()
For i = 1 To inputbox("how many sheets")
Sheets("xxx").Copy after:=Sheets(Sheets.Count)
Next i
End Sub
 
Back
Top