Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In cell A10 I have the formula =Today() which is fine, but how can I code
it so that when the file is saved the value in A10 at the next opening doesn't update. (I know to use the "BeforeClose" sub procedure). In other words it retains the date that the file was saved. Sandy |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sandy
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) ActiveSheet.Range("A10").Value = Format(Date, "dddd, mmmm dd, yyyy") End Sub Gord Dibben Excel MVP On Thu, 24 Nov 2005 22:50:54 -0000, "Sandy" wrote: In cell A10 I have the formula =Today() which is fine, but how can I code it so that when the file is saved the value in A10 at the next opening doesn't update. (I know to use the "BeforeClose" sub procedure). In other words it retains the date that the file was saved. Sandy |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excellent Gord thank you.
Sandy "Gord Dibben" <gorddibbATshawDOTca wrote in message ... Sandy Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) ActiveSheet.Range("A10").Value = Format(Date, "dddd, mmmm dd, yyyy") End Sub Gord Dibben Excel MVP On Thu, 24 Nov 2005 22:50:54 -0000, "Sandy" wrote: In cell A10 I have the formula =Today() which is fine, but how can I code it so that when the file is saved the value in A10 at the next opening doesn't update. (I know to use the "BeforeClose" sub procedure). In other words it retains the date that the file was saved. Sandy |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
in the auto_close procedure make a code that save the value of A10 and paste
it on A9 (range("a9").value=range("a10").value) then, in a auto_open procedure write: if Range("A9")<"" then Range("a9").select selection.cut 'and then paste it in A10 else Range("a10").formula="=today()" end if HTH "Sandy" wrote: In cell A10 I have the formula =Today() which is fine, but how can I code it so that when the file is saved the value in A10 at the next opening doesn't update. (I know to use the "BeforeClose" sub procedure). In other words it retains the date that the file was saved. Sandy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Clarification - how to automatically update cells with a date and date range | Excel Discussion (Misc queries) | |||
Automatically update a cell with a date based on anther cells date | Excel Discussion (Misc queries) | |||
input a date or update it based on date in another cell | New Users to Excel | |||
How to update a cell if a specific date is included in a date rang | Setting up and Configuration of Excel | |||
Date update on data update | Excel Programming |