ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   automatically show modified date? (https://www.excelbanter.com/excel-worksheet-functions/197567-automatically-show-modified-date.html)

Tacrier

automatically show modified date?
 
When I save changes to my current worksheet, is it possible have a formula in
A2 to display today's date (based on the condition that changes were saved to
the current worksheet)?

A1 contents:
"Information on this worksheet was last updated on:"

A2: "today's date" (if in fact "today", changes were made and saved)

Thanks!! :)

Wigi

automatically show modified date?
 
Hi

Try something like this. You copy the code to ThisWorkbook in VBA.


Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)

Worksheets("name of the sheet").Range("cell address").Value = Date

End Sub


Change the sheet and range.

--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"Tacrier" wrote:

When I save changes to my current worksheet, is it possible have a formula in
A2 to display today's date (based on the condition that changes were saved to
the current worksheet)?

A1 contents:
"Information on this worksheet was last updated on:"

A2: "today's date" (if in fact "today", changes were made and saved)

Thanks!! :)


Tacrier

automatically show modified date?
 
Awesome. Thank you!! :)

"Wigi" wrote:

Hi

Try something like this. You copy the code to ThisWorkbook in VBA.


Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)

Worksheets("name of the sheet").Range("cell address").Value = Date

End Sub


Change the sheet and range.

--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"Tacrier" wrote:

When I save changes to my current worksheet, is it possible have a formula in
A2 to display today's date (based on the condition that changes were saved to
the current worksheet)?

A1 contents:
"Information on this worksheet was last updated on:"

A2: "today's date" (if in fact "today", changes were made and saved)

Thanks!! :)



All times are GMT +1. The time now is 02:05 AM.

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