ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   add a date that changes only when I save the doc. (https://www.excelbanter.com/excel-worksheet-functions/131120-add-date-changes-only-when-i-save-doc.html)

lauras03

add a date that changes only when I save the doc.
 
I have a file that I update and want to, when I open it, see the last time it
was updated. Is there a function that will do this?
--
Thanks,
Laura

Ron de Bruin

add a date that changes only when I save the doc.
 
Hi

One way

If macro's are not disabled you can use this event to add the date/time in a cell
every time you save the file (I use A1 in :Sheet1")

Copy this in the Thisworkbook module of the workbook

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Sheets("Sheet1").Range("A1").Value = Format(Now, "dd-mmm-yy h-mm-ss")
End Sub


--

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


"lauras03" wrote in message ...
I have a file that I update and want to, when I open it, see the last time it
was updated. Is there a function that will do this?
--
Thanks,
Laura



All times are GMT +1. The time now is 09:31 AM.

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