ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Showing Custom file properties in Header (https://www.excelbanter.com/excel-discussion-misc-queries/154110-showing-custom-file-properties-header.html)

Flosp

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

Gary''s Student

Showing Custom file properties in Header
 
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").Val ue
ActiveSheet.PageSetup.LeftHeader = n
End Sub

--
Gary''s Student - gsnu200737


"Flosp" wrote:

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



All times are GMT +1. The time now is 11:47 AM.

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