how can keep the modified date record in worksheet

L

Lee

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
 
E

Edward

Have a cell set as counter of number of saved times, when you save the
file you increase the counter by 1, then you can have a logic that
when the counter is greater than 1, you won't update the modified
time.
 
L

Lee

Thanks for your reply. but how to achieve it? i am the rookie for excel
marco, only know ctrl +P & V.

Thanks
 

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