last updated

  • Thread starter Thread starter mdcerino
  • Start date Start date
M

mdcerino

Is there a way to have excel "print" the document last modified dat
into the spreadsheet
 
You need VBA, but you could use a UDF. Here is an example

Function DocProps(prop As String)

On Error GoTo err_value
DocProps = ActiveWorkbook.BuiltinDocumentProperties(prop)
Exit Function

err_value:
DocProps = CVErr(xlErrValue)
End Function



and can be used like so

=DocProps("Last save time")

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
So I go into VBA and enter the function coding...add the function to the
cell I want it in, then what? Not sure what to do now...
 
Format the cell as some date format and you should see the value.


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Nope.

Here's what I did...

Went into VBA editor through the macros menu...entered the coding unde
"(General)" and "DocProps" and saved it . Entered the =DocProps("Las
Save Time") in the cell I wanted it. Formatted the cell as
date....and it keeps giving me the ?NAME error
 
Did you put the code in a standard code module?

If you give me your email address, I can mail you a working file.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Back
Top