Showing Custom file properties in Header

G

Guest

Is it possible to get 'Custom File Properties' to show in excel headers and
footer? If, so how do you do this?
 
G

Guest

Lets first set up a custom property called flosp and give it the value 666:

Sub firstone()
Dim dp As DocumentProperties
Set dp = ThisWorkbook.CustomDocumentProperties
dp.Add Name:="flosp", _
LinkToContent:=False, _
Type:=msoPropertyTypeNumber, _
Value:=666
End Sub

Next we set up the header:

Sub nextone()
n = ThisWorkbook.CustomDocumentProperties("flosp").Value
ActiveSheet.PageSetup.LeftHeader = n
End Sub
 

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