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 / Programming / April 2008

Tip: Looking for answers? Try searching our database.

Copyingworksheets

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andyg - 11 Apr 2008 22:24 GMT
I create daily reports with data linked from day to day. Many cells are
protectyed formulas.

I'd like to create a macro to copy the current report, creating the next
day's base report.
anon - 11 Apr 2008 23:05 GMT
Simply record a macro while you copy the sheet. Or use code similar to
below. This will copy the sheet, i haven't checked about linked data/
formulas but presume your new sheet would be linked to the sheet 2
days ago.

Sub copysheet()
Dim thissht
Dim newshtname
thissht = InputBox("What is the name of the existing sheet you wish to
copy?")
   ActiveWorkbook.Sheets(thissht).Copy Before:=Sheets(1)
   newshtname = InputBox("What would you like to call the new
sheet?")
   ActiveWorkbook.ActiveSheet.Name = newshtname
End Sub
 
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.