Update Date, Time Only Upon Save

  • Thread starter Thread starter Paul Calcagno
  • Start date Start date
P

Paul Calcagno

Is there anyway to set up cells that use the Today () and/or Now ()
functions so that they only update when I re-save the file.

Right now without doing anything but opening, the day and/or time always
changes to the current date and time. I don't want that to happen.

Thanks...........Paul C.
 
Hi,

No you can't do it with the NOW() formula but you can use the before save
workbook event. Alt +F11 to open Vb editor. Double click 'ThisWorkbook' and
paste the code beloew in on the right. Change the sheet and cell to suit

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Sheets("sheet1").Range("A1") = Now
End Sub


Mike
 
Back
Top