View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
lee lee is offline
external usenet poster
 
Posts: 184
Default how can keep the modified date record in worksheet

I just learnt how to use the function as below to show the " last modified
date", but how can I keep record not changed next time?

For example, at the first time I inputed the data and save, it will show me
the time once I closed and opened it. But the second time, the time will show
me the latest modified time but not the time at the first modification. How
can I keep that not update next time?

'-----------------------------------------------------------------
Function DocProps(prop As String)
Dim LastDate As String
Dim wbProp As String

'-----------------------------------------------------------------
Application.Volatile
On Error GoTo err_value
wbProp = "last save time"
LastDate = ActiveWorkbook.BuiltinDocumentProperties(wbProp)
DocProps = ActiveWorkbook.BuiltinDocumentProperties _
(prop)
Exit Function
err_value:
DocProps = CVErr(xlErrValue)
End Function