Is there a "last saved on date/user" macro/function for Excel 2003
Hi, I am trying my best to locate a macro or whatever to create a "Last saved
on (&date)" entry on my Excel spreadsheet. If it is possible to add the last user's name that would be great too! I looked through this forum and was unable to find a direct example. If you know how to do this, please provide the code/macro and whatever instructions you can. THANKS! |
Is there a "last saved on date/user" macro/function for Excel 2003
Private Sub Workbook_BeforeClose(Cancel As Boolean)
With ThisWorkbook With Worksheets("Sheet1") .Range("A1").Value = Environ("UserName") .Range("A2").Value Format( _ ThisWorkbook.BuiltinDocumentProperties( _ "last save time"), " dd mmm yyyy hh:mm:ss") End With .Save End With End Sub -- --- HTH Bob (change the xxxx to gmail if mailing direct) "Zliz" wrote in message ... Hi, I am trying my best to locate a macro or whatever to create a "Last saved on (&date)" entry on my Excel spreadsheet. If it is possible to add the last user's name that would be great too! I looked through this forum and was unable to find a direct example. If you know how to do this, please provide the code/macro and whatever instructions you can. THANKS! |
Is there a "last saved on date/user" macro/function for Excel 2003
Give this code a whirl...
With ThisWorkbook MsgBox .BuiltinDocumentProperties("Last Save Time") MsgBox .BuiltinDocumentProperties("Last Author") End With And maybe give this a look... http://msdn2.microsoft.com/ru-ru/lib...es(VS.80).aspx -- HTH... Jim Thomlinson "Zliz" wrote: Hi, I am trying my best to locate a macro or whatever to create a "Last saved on (&date)" entry on my Excel spreadsheet. If it is possible to add the last user's name that would be great too! I looked through this forum and was unable to find a direct example. If you know how to do this, please provide the code/macro and whatever instructions you can. THANKS! |
All times are GMT +1. The time now is 05:32 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com