DISPLAYING LAST MODIFIED/SAVED TIME AND DATE ON A WORKSHEET


Posted by Phillip on August 17, 2001 11:50 AM

Could somebody show me how to display in a cell the
last time a worksheet was modified or saved? I would
like to be able display this info on the worksheet
somewhere so other users will know how recent the
data is on the worksheet (the worksheet is constantly updated). Thanks, to whoever can help.

Posted by Sean Tobin on August 17, 2001 3:33 PM

In the VB Editor, on the left where the Tree is, double click on "ThisWorkbook". In the editing window there are two dropdowns. On the left select Workbook. On the right select BeforeSave.

your code will look like this (A1 = "Last updated:)

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Range("B1").Value = Format(Now(), "dd-mm-yy hh:mm:ss")

End Sub



Posted by Phillip on August 20, 2001 10:57 AM

Re: ++SEAN TOBIN++ Thanks for the response, but . . .

Could you help me some more?
I kinda know how you explained the solution for me , but could you simplify it more for me?
I am not that VBA literate if you know what I mean.

Thanks