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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top