PageSetup.HeaderMargin Property (Excel)

Office 2013 and later

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Returns or sets the distance from the top of the page to the header, in points. Read/write Double.

expression .HeaderMargin

expression A variable that represents a PageSetup object.

Margins are set or returned in points. Use the InchesToPoints method or the CentimetersToPoints method to convert measurements from inches or centimeters.

This example sets the header margin of Sheet1 to 0.5 inch.

Worksheets("Sheet1").PageSetup.HeaderMargin = _