This documentation is archived and is not being maintained.

LeftMargin Property [Excel 2003 VBA Language Reference]

Office 2003

Returns or sets the size of the left margin, in points. Read/write Double.

Remarks

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

Example

This example sets the left margin of Sheet1 to 1.5 inches.

Worksheets("Sheet1").PageSetup.LeftMargin = _
        Application.InchesToPoints(1.5)
		

This example sets the left margin of Sheet1 to 2 centimeters.

Worksheets("Sheet1").PageSetup.LeftMargin = _
        Application.CentimetersToPoints(2)
		

This example displays the current left-margin setting for Sheet1.

marginInches = Worksheets("Sheet1").PageSetup.LeftMargin / _
    Application.InchesToPoints(1)
MsgBox "The current left margin is " & marginInches & " inches"
		


Applies to | PageSetup Object

See Also | BottomMargin Property | RightMargin Property | TopMargin Property


Show: