automatically show modified date?

T

Tacrier

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!! :)
 
W

Wigi

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.
 
T

Tacrier

Awesome. Thank you!! :)

Wigi said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top