ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Is there a "last saved on date/user" macro/function for Excel 2003 (https://www.excelbanter.com/excel-discussion-misc-queries/124386-there-last-saved-date-user-macro-function-excel-2003-a.html)

Zliz

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!

Bob Phillips

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!




Jim Thomlinson

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