Originally found here:
Here's how it's done: Right-click on worksheet tab, select "View Code". Copy and paste this code into the ThisWorkbook module (It features an Excel document icon on it.) It will automatically run when you save the file.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Sheets('Sheet1').Range('A1').Value = ThisWorkbook.BuiltinDocumentProperties('Last Save Time')
Sheets('Sheet1').Range('A2').Value = ThisWorkbook.BuiltinDocumentProperties('Author')
End Sub
Drop me a comment if you find this useful!
1 comments:
Very handy, indeed. Rather then doc poperty "Author", which is constant, the property "Last Author" returns the last person to have saved the document, which was more useful in my case.
Post a Comment