Hi there,
I'd like to have a date displayed on my worksheet that updates ONLY when the worksheet is saved with changes. If I just open it, look at it and close it without saving I want the date to remain unchanged from the last time the worksheet was modified. Can this be done?
1. I've tried some VBA but it gives me the current date/time stamp each time I open the workbook i.e. each time the macro runs.
For example, I used this code I found on another forum but it doesn't give me what I want.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Sheets("Sheet1").Range("A2") = Date
End Sub
2. Plus, if I want to the date to be displayed in cell A2 - what function would I need to put in there?
Thanks!
Bookmarks