Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How do I display custom file properties in a cell

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
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



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default How do I display custom file properties in a cell

Hi Bob,

Thanks for your response. I am an intermediate user of Excel and I dont know
how to use VB. Can you help me a little further at all please ?

Many Thanks

Glen


"Glen Perry" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default How do I display custom file properties in a cell

Sure.

First, go to the VBIDE (Alt-F11)

Insert a new code module (InsertModule)

Paste the code that I gave you in there.

Then go back to the Excel window and use it as shown

=CustomProps("Project")

--
HTH

Bob Phillips

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

"Glen Perry" wrote in message
...
Hi Bob,

Thanks for your response. I am an intermediate user of Excel and I dont

know
how to use VB. Can you help me a little further at all please ?

Many Thanks

Glen


"Glen Perry" wrote:

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



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default How do I display custom file properties in a cell

Bob,

You are a superstar !!! Thank you so much :)

Glen


"Glen Perry" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I concatenate text in cells to make a working formula? Matt S. R. Excel Discussion (Misc queries) 11 November 11th 05 03:44 PM
Custom File Properties jujuwillis Excel Discussion (Misc queries) 1 August 1st 05 04:18 PM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
Converting custom cell properties to text Hnelg Excel Discussion (Misc queries) 2 May 3rd 05 12:20 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 07:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"