CenterHeader Property

Applies To

PageSetup object.

Description

Returns or sets the center part of the header. Read/write String. For more information, see Formatting Codes for Headers and Footers.

Remarks

Special format codes can be used in the header text.

See Also

CenterFooter property, LeftFooter property, LeftHeader property, RightFooter property, RightHeader property.

Example

This example prints the date and page number at the top of each page.

Worksheets("Sheet1").PageSetup.CenterHeader = "&D page &P of &N"