Sheet saved date


Posted by Jim on November 13, 2001 5:40 AM

In Excel 97, how can I populate A1 on a given sheet with the date that changes were last saved to that sheet? The file will have many sheets, each with its own last saved date. I prefer a formula or function over a macro for this.

Posted by Hodge on November 13, 2001 6:04 AM

All sheets in a file are saved at the same time. I don't believe you can save one sheet and not all the others.

Posted by Jim on November 13, 2001 6:12 AM

Maybe it would make a difference if my question were worded to detect and plug the date that sheet was changed (instead of saved). Any takers on that one??

Posted by Hodge on November 13, 2001 6:24 AM

I know you said you would rather have a formula than a macro, but this goes well with the "Worksheet_Change" event handler.

Use the code:
ActiveSheet.Range("A1").Formula = "=TODAY()"

Hope that is a start.



Posted by Juan Pablo on November 13, 2001 6:29 AM

How about..

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Excel.Range)
Sh.[A1] = Date
End Sub

This goes in the workbook module. Not a formula (Doesn't update when calculation is done), just updates when a change has been made in a specific sheet.

Juan Pablo