Save Today()

  • Thread starter Thread starter 3Nails
  • Start date Start date
3

3Nails

I would like to save the current date in cell A1 and not have it change,
regardless of when I open the sheet. I copy the current sheet for the next
day's activity. When I open the new sheet the next day I would like the new
sheet have the new current date and save it as well. Any quick fix for this?
Thanks.....
 
So when you copy to the new sheet you want to save it such that the date does
NOT change when it is opened next time?

Use this macro
Sub Macro2()
Worksheets("Sheet1").Select
Cells.Select
Selection.Copy
Sheets("Sheet2").Select
Range("A1").Select
ActiveSheet.Paste
Range("A1").Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
ActiveWorkbook.Save
End Sub
 
You can enter the current data as a static value (won't change in the
future as the NOW or TODAY function will) by pressing CTRL ; (hold
down the CTRL key and press the semi-colon key). Or, if you prefer,
you can add it using code:

ActiveSheet.Range("A1").Value = Format(Now,"Short Date")

To copy the active sheet for the next day, use code like the
following. It will copy the Active Sheet to the end of the existing
sheets, assign today's date to cell A1 of the new sheet, and (if you
uncomment the line) names the new sheet with the current date.

Sub CopySheet()
With ThisWorkbook.Worksheets
ActiveSheet.Copy after:=.Item(.Count)
End With
With ActiveSheet
.Range("A1").Value = Format(Now, "Short Date")
' uncomment line to name the new sheet.
'.Name = "Sheet " & .Range("A1").Value
End With
End Sub


Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top