View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default How do I display custom file properties in a cell

Function CustomProps(prop As String)


On Error GoTo err_value
CustomProps = ActiveWorkbook.CustomDocumentProperties(prop)
Exit Function


err_value:
CustomProps = CVErr(xlErrValue)
End Function


and can be used like so


=-CustomProps("myProperty")


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Glen Perry" <Glen wrote in message
...
I can define custom file properties using File / Properties, but how do I
create a formula or similar in a cell to reference the custom file

properties
?

eg. If I specify a custom file property called "Project" and give it a

value
of "Project XXX", how can I get that value displayed in a worksheet cell ?

Thanks