ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   copying full worksheets (https://www.excelbanter.com/excel-programming/433644-copying-full-worksheets.html)

Jerry

copying full worksheets
 
How can I copy a worksheets a number of times. User input as to the number
of worksheets to be created and copy sheet1 that number of times. Thanks in
advance.

Jacob Skaria

copying full worksheets
 
Try the below

Sub Macro1()
intCount = 5
For intTemp = 1 To intCount
Sheets("asd a").Copy After:=Sheets("asd a")
Next
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Jerry" wrote:

How can I copy a worksheets a number of times. User input as to the number
of worksheets to be created and copy sheet1 that number of times. Thanks in
advance.


Per Jessen

copying full worksheets
 
Hi

Try this:

Sub CopySheets()
Dim ShToCopy
Dim NumOfCopies As Long

Set ShToCopy = Worksheets("Sheet1") 'Change sheet name as required
NumOfCopies = InputBox("How many copies of the worksheet do you need?")

For sh = 1 To NumOfCopies
ShToCopy.Copy after:=Worksheets(Worksheets.Count)
Next
End Sub

Regards,
Per

"Jerry" skrev i meddelelsen
...
How can I copy a worksheets a number of times. User input as to the
number
of worksheets to be created and copy sheet1 that number of times. Thanks
in
advance.



Jim Thomlinson

copying full worksheets
 
Note that when copying worksheets you can hit an error as described here...

http://support.microsoft.com/default...84&Product=xlw
--
HTH...

Jim Thomlinson


"Per Jessen" wrote:

Hi

Try this:

Sub CopySheets()
Dim ShToCopy
Dim NumOfCopies As Long

Set ShToCopy = Worksheets("Sheet1") 'Change sheet name as required
NumOfCopies = InputBox("How many copies of the worksheet do you need?")

For sh = 1 To NumOfCopies
ShToCopy.Copy after:=Worksheets(Worksheets.Count)
Next
End Sub

Regards,
Per

"Jerry" skrev i meddelelsen
...
How can I copy a worksheets a number of times. User input as to the
number
of worksheets to be created and copy sheet1 that number of times. Thanks
in
advance.





All times are GMT +1. The time now is 05:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com