ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Display Last Saved By date & User? (https://www.excelbanter.com/excel-discussion-misc-queries/48531-display-last-saved-date-user.html)

Annabelle

Display Last Saved By date & User?
 
Although found under the Properties section, is it possible to display
on the worksheet the Last Saved By date and Last Saved By user?


Ron de Bruin

Hi Annabelle

With code you can do this
Copy this event in the Thisworkbook module
It will automatic 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


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Annabelle" wrote in message oups.com...
Although found under the Properties section, is it possible to display
on the worksheet the Last Saved By date and Last Saved By user?




Annabelle

I modified to code to fit my worksheet name and the cells I expect to
see the data - works great; however, the User name appears to be coming
from whatever name was updated in the Properties Summary tab. Can I use
the name (or network name) of the actual person who last saved the
file? This is the name listed in the Properties Statistics tab.

There will be up to five or six folks who can make changes and save
this worksheet, so it's important to know who last saved the document.

Thanks for your help.


Ron de Bruin

Hi Annabelle

Try

Sheets("Sheet1").Range("A2").Value = Environ("username")

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Annabelle" wrote in message ups.com...
I modified to code to fit my worksheet name and the cells I expect to
see the data - works great; however, the User name appears to be coming
from whatever name was updated in the Properties Summary tab. Can I use
the name (or network name) of the actual person who last saved the
file? This is the name listed in the Properties Statistics tab.

There will be up to five or six folks who can make changes and save
this worksheet, so it's important to know who last saved the document.

Thanks for your help.




Annabelle

Perfect! Thank you again for your help.



All times are GMT +1. The time now is 03:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com