'-----------------------------------------------------------------
Function DocProps(prop As String)
'-----------------------------------------------------------------
Application.Volatile
On Error GoTo err_value
DocProps = ActiveWorkbook.BuiltinDocument*Properties _
(prop)
Exit Function
err_value:
DocProps = CVErr(xlErrValue)
End Function
and enter in a cell such as
=DocProps ("last author")
or
=DocProps ("last save time")
This will not update when you save within Excel. If you need this, add
Option Explicit
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _
Cancel As Boolean)
Application.EnableEvents = False
Cancel = True
ActiveWorkbook.Save
Application.CalculateFull
wb_exit:
Application.EnableEvents = True
End Sub
'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code
--
HTH
RP
(remove nothere from the email address if mailing direct)
"SirSimons" wrote in message
...
I need a funktion in my excel sheet, that indicate the person who have
saved
a file the last time - Like the NOW() formula, I look for a formula that
link
to LastSavedBy
|