ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How can I using Excel custom document properties in the header? (https://www.excelbanter.com/excel-worksheet-functions/53655-how-can-i-using-excel-custom-document-properties-header.html)

ecalvo

How can I using Excel custom document properties in the header?
 
I can set it up in the File\Properties menu item under the Custom tab, but I
cannot figure out how to reference that custom vaue anywhere in the Excel
Spreadsheets or in the Header or Footer of each spreadsheet.

Chris Lavender

How can I using Excel custom document properties in the header?
 
You can reference it through VBA, eg

ActiveWorkbook.CustomDocumentProperties("Project") .Value

and then use VBA to insert the value in a cell or header/footer

Best rgds
Chris Lav

"ecalvo" wrote in message
...
I can set it up in the File\Properties menu item under the Custom tab, but

I
cannot figure out how to reference that custom vaue anywhere in the Excel
Spreadsheets or in the Header or Footer of each spreadsheet.




Duke Carey

How can I using Excel custom document properties in the header?
 
Only by using VBA. Anything that you create as a Custom property is accessed
by referencing the Workbook's CustomDocumentProperties collection. You can
access Excel's canned properties by referencing the Workbook's
BuiltinDocumentProperties collection

"ecalvo" wrote:

I can set it up in the File\Properties menu item under the Custom tab, but I
cannot figure out how to reference that custom vaue anywhere in the Excel
Spreadsheets or in the Header or Footer of each spreadsheet.


ecalvo

How can I using Excel custom document properties in the header
 
Thanks. But how would I do that?

"Duke Carey" wrote:

Only by using VBA. Anything that you create as a Custom property is accessed
by referencing the Workbook's CustomDocumentProperties collection. You can
access Excel's canned properties by referencing the Workbook's
BuiltinDocumentProperties collection

"ecalvo" wrote:

I can set it up in the File\Properties menu item under the Custom tab, but I
cannot figure out how to reference that custom vaue anywhere in the Excel
Spreadsheets or in the Header or Footer of each spreadsheet.


Duke Carey

How can I using Excel custom document properties in the header
 
Do you know the rudiments of using VBA? If no, then start by looking at
David McRitchie's website

http://www.mvps.org/dmcritchie/excel...m#vbatutorials

and/or Chip Pearson's

http://www.cpearson.com/excel/codemods.htm

and/or JE MCGimpsey's

http://www.mcgimpsey.com/excel/index.html

Once you have the rudiments, then you'll want to use the Wokrbook's
Workbook_BeforePrint event to update the page headers and footers.

While there are lots of people in the Worksheet function NG that also
provide answers in the VBA programming NG, your best forum for getting coding
help is in the VBA group

Good luck








"ecalvo" wrote:

Thanks. But how would I do that?

"Duke Carey" wrote:

Only by using VBA. Anything that you create as a Custom property is accessed
by referencing the Workbook's CustomDocumentProperties collection. You can
access Excel's canned properties by referencing the Workbook's
BuiltinDocumentProperties collection

"ecalvo" wrote:

I can set it up in the File\Properties menu item under the Custom tab, but I
cannot figure out how to reference that custom vaue anywhere in the Excel
Spreadsheets or in the Header or Footer of each spreadsheet.



All times are GMT +1. The time now is 01:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com