How do I show some of the file properties in a cell in a work she.

  • Thread starter Mike on the learning curve!
  • Start date
M

Mike on the learning curve!

I just need to display the "author" from the file properties in a cell in the
worksheet of the same file!

Is this a function?
Thanks
 
G

Gord Dibben

Mike

User Defined Function, not built-in.

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

In a cell enter...........

=DOCPROPS("author")
or
=DOCPROPS("last save time")

Gord Dibben Excel MVP
 
B

Bob Phillips

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 use in the worksheet with

=DOCPROPS("Author")


--

HTH

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


"Mike on the learning curve!" <Mike on the learning
[email protected]> wrote in message
news:[email protected]...
 

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