Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default 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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default 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.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default 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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying worksheets tiger21 Excel Discussion (Misc queries) 1 December 28th 07 07:55 PM
Copying Full Workbooks StressedSara Excel Discussion (Misc queries) 5 May 7th 07 06:14 AM
how to auto populate full worksheets hoyt New Users to Excel 0 June 13th 06 08:39 AM
Copying worksheets in VBA GLT Excel Programming 3 December 15th 05 06:55 PM
Copying Worksheets Tim Marsden Excel Programming 7 October 6th 04 02:12 AM


All times are GMT +1. The time now is 05:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"