Inserting the date that an excel sheet is saved into a cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to insert the last saved (last updated) date into my excel sheet. Is
there a way to do this? It can be done in MS Project and MS Word.
 
You will need a UDF

Function DocProps(prop As String)
application.volatile
On Error GoTo err_value
DocProps = ActiveWorkbook.BuiltinDocumentProperties _
(prop)
Exit Function
err_value:
DocProps = CVErr(xlErrValue)
End Function
and enter



in a cell such as
=DocProps ("last author") for the author
or
=DocProps ("last save time") for the last saved date, format the cell as
date


--

HTH

RP
(remove nothere from the email address if mailing direct)
 
To put the Last saved information into the Active Cell...

Sub test()
Dim objProperty As Object

On Error Resume Next

For Each objProperty In _
ActiveWorkbook.BuiltinDocumentProperties
With objProperty
If .Name = "Last save time" Then
ActiveCell.Value = .Value
End If
End With
Next

End Sub

HTH,
Gary Brown
 

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

Back
Top