Date formula in cell that shows last date saved

I'm drawing a blank and can't remember how to do this.  I have an Excel document that is a quote document.  I want the Date cell to display the date the document was last saved.  If I use the Today() formula, and say I sent this quote to a customer a week ago and they open it up today, it will have todays date and not last weeks date.
Answer
Answer

Hi,

ALT+F11 to open VB editor. double cick 'ThisWorkbook' and paste the code below in on the right. Change the range to where you want the date to be

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Sheets("Sheet1").Range("A1").Value = Date
End Sub


If this post answers your question, please mark it as the Answer.
Mike H
If this response answers your question then please mark as answer.

Mike H

11 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated October 5, 2021 Views 30,704 Applies to: