![]() |
Save Today()
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..... |
Save Today()
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 "3Nails" wrote: 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..... |
Save Today()
Activesheet.Range("A1").Value = Date '<< will perform what you want
"3Nails" wrote: 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..... |
Save Today()
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) On Mon, 27 Oct 2008 13:36:34 -0700, 3Nails wrote: 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..... |
All times are GMT +1. The time now is 09:06 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com