PC Review


Reply
Thread Tools Rate Thread

Copyingworksheets

 
 
Andyg
Guest
Posts: n/a
 
      11th Apr 2008
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.
 
Reply With Quote
 
 
 
 
anon
Guest
Posts: n/a
 
      11th Apr 2008
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
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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



Features
 

Advertising
 

Newsgroups
 


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