How can I using Excel custom document properties in the header?

G

Guest

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.
 
C

Chris Lavender

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
 
G

Guest

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
 
G

Guest

Thanks. But how would I do that?

Duke Carey said:
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
 
G

Guest

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/excel.htm#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
 

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