Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / June 2007

Tip: Looking for answers? Try searching our database.

copy worksheet multiple times base on user's input

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
azu_daioh@yahoo.com - 15 Jun 2007 17:29 GMT
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
azu_daioh@yahoo.com - 15 Jun 2007 17:43 GMT
nvm. I figured it out.
Don Guillett - 15 Jun 2007 17:51 GMT
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

Signature

Don Guillett
SalesAid Software
dguillett1@austin.rr.com

> 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
[quoted text clipped - 8 lines]
>
> Sharon
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.