File/custom Property fields

K

KC

Hi There,
Now I know how to create these File/Custom property fields, but I don't know
how to make you of them in the worksheet!
in simple, How to insert the File/custom property fields into excel cells?

Thanks,
-KC
 
A

Ardus Petus

Function CustomProperty(sProp As String) As Variant
CustomProperty = ActiveWorkbook.CustomDocumentProperties(sProp)
End Function

HTH
 
K

KC

sorry there was a typo,

Hi There,
Now I know how to create these File/Custom property fields, but I don't know
how to make *use of them in the worksheet!
in simple, How to insert the File/custom property fields into excel cells?

Thanks,
-KC
 
A

Ardus Petus

Paste the Function I sent you into a standard Module.
In your worksheet, enter:
=CustomProperty("blah")

HTH
 
K

KC

Thanks Ardus, it works, but now i have another problem; if i make any changes
to the file properties the changes are not getting refreshed in the cells!

thanks,
-KC
 
A

Ardus Petus

Try:

Function CustomProperty(sProp As String) As Variant
Application.Volatile
CustomProperty = ActiveWorkbook.CustomDocumentProperties(sProp)
End Function


HTH
 
B

Bob Phillips

Be aware that that will still require forcing a calculation for the cell to
update.

--
HTH

Bob Phillips

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

KC

no luck, i've tried to save the and re-open the file, still i don't see the
updated "file property" value getting refreshed, i would have to revisit the
cell and refresh it manually :(

Let me try to explain once again what i'm really searching for!

* there are many places in Excel sheets where i user many common fields
(client/author/filepath/release version/base version/baselined date/ect), now
all i'm trying to achive is to store all these common things into custom/file
properties, just like i do in MSWord, and go on referencing this custom/file
properties.

now with your approach i'm able to retrive my own defined custom properties,
but if i make any changes to these fields, this value is not getting
reflected no matter what i do, unless i revisit the cell and manually refresh
it!

hope you know what i'm trying to achive here.

Thanks again,
-KC
 
K

KC

Hello guys,
I found the answer for my other part of my question.

I'll will also need to make sure the spreadsheet is updated manually. To do
this-
Click on <Tools><Options><Calculations><Manual>
OR <F9>

Thanks again.
-KC
 
B

Bob Phillips

Didn't I say that - Be aware that that will still require forcing a
calculation for the cell to update.

--
HTH

Bob Phillips

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