ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Date Formula (https://www.excelbanter.com/excel-discussion-misc-queries/184967-date-formula.html)

AP-Topper

Date Formula
 
Is it possible to show an automatic date on a sheet which indicates when it
was last modified? and of course updates from then on...
--
Thanks.

Ron de Bruin

Date Formula
 
Hi AP-Topper

With code you can do this

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _
Cancel As Boolean)
'If you save the file the date/time will be placed in cell A1 of Sheet1
Sheets("Sheet1").Range("A1").Value = Format(Now, "yyyy-mmm-dd hh:mm:ss")
End Sub

Copy the code in the Thisworkbook module and it will run automatic when you save the file
See
http://www.rondebruin.nl/code.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"AP-Topper" wrote in message ...
Is it possible to show an automatic date on a sheet which indicates when it
was last modified? and of course updates from then on...
--
Thanks.



All times are GMT +1. The time now is 10:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com