LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Don Don is offline
external usenet poster
 
Posts: 487
Default Add a Sheet From a Previous Sheet Macro

I have a daily reporting system in which I have a macro to make a new sheet
as well as clear some information from the previous sheet in a workbook with
muliple sheets of different names besides DR(1) etc. Since the number of days
per job is variable, I need to add something into the macro to copy the
previous day information to the new sheet instead of reverting back to the
original to make a copy of it. The macro that I use now is below and you can
see it copys DR(1) when I would like it to copy from DR(6) if that sheet
happens to be in the workbook. I'm not sure what to add in and everthing
tried to date has not worked.

Sub NewDay()

Sheets("DR(1)").Copy After:=Sheets("DR(1)")
Range("U1") = Range("U1") + 1
Range("G12:O31,Q44:V49,H47:H49,K46:K49,N46:N49").S elect
Selection.ClearContents
Range("G12").Select
End Sub:

Regards and thanks in advance.
 
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
hyperlinks - macro not working to take them off the sheet Lorelei New Users to Excel 1 September 23rd 06 02:18 AM
Rehide Sheet in macro. ChuckF Excel Worksheet Functions 3 March 29th 06 10:39 PM
Finding and compiling list of cells containing data... Richard Walker Excel Worksheet Functions 6 March 18th 06 02:17 PM
Does excel recognise names rather than cells? Sue Excel Worksheet Functions 9 May 22nd 05 04:51 AM
Can a macro format a hidden sheet? Robert Excel Discussion (Misc queries) 1 February 9th 05 06:13 PM


All times are GMT +1. The time now is 02:42 PM.

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

About Us

"It's about Microsoft Excel"