Class Page (Excel VBA)

The class Page represents a page in a workbook. Use the Page object and the related methods and properties for programmatically defining page layout in a workbook. To use a Page class variable it first needs to be instantiated, for example


Dim pag as Page
Set pag = ActiveChart.PageSetup.Pages(Index:=1)

For Each

Here is an example of processing the Page items in a collection.


Dim pag As Page
For Each pag In ActiveChart.PageSetup.Pages
	
Next pag

CenterFooter

Specifies a picture or text to be center-aligned in the page footer.


Dim hfrCenterFooter As HeaderFooter
Set hfrCenterFooter = ActiveChart.PageSetup.Pages(1).CenterFooter

CenterHeader

Specifies a picture or text to be center-aligned in the page header.


Dim hfrCenterHeader As HeaderFooter
Set hfrCenterHeader = ActiveChart.PageSetup.Pages(1).CenterHeader

LeftFooter

Specifies a picture or text to be left-aligned in the page footer.


Dim hfrLeftFooter As HeaderFooter
Set hfrLeftFooter = ActiveChart.PageSetup.Pages(1).LeftFooter

LeftHeader

Specifies a picture or text to be left-aligned in the page header.


Dim hfrLeftHeader As HeaderFooter
Set hfrLeftHeader = ActiveChart.PageSetup.Pages(1).LeftHeader

RightFooter

Specifies a picture or text to be right-aligned in the page footer.


Dim hfrRightFooter As HeaderFooter
Set hfrRightFooter = ActiveChart.PageSetup.Pages(1).RightFooter

RightHeader

Specifies a picture or text to be right-aligned in the page header.


Dim hfrRightHeader As HeaderFooter
Set hfrRightHeader = ActiveChart.PageSetup.Pages(1).RightHeader