DateLastModified

N

nina

Hi! I´m making a macro on Excel 2003 and i have to find how to show the date
of the last modified in a workbook. Someone can help me?
 
B

Bob Phillips

Using VBA


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
=DOCPROPS("last save time")
(format cell as date)


This is a custom UDF, so you need to place the code in a normal code module.



--

HTH

RP
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top