AddIndent Property

Microsoft Excel Visual Basic

True if text is automatically indented when the text alignment in a cell is set to equal distribution either horizontally or vertically. Read/write Boolean.

expression.AddIndent

expression    Required. An expression that returns a Style object.

ShowAddIndent property as it applies to the CellFormat and Range objects.

True if text is automatically indented when the text alignment in a cell is set to equal distribution either horizontally or vertically. Read/write Variant.

expression.AddIndent

expression    Required. An expression that returns one of the above objects.

Remarks

To set text alignment to equal distribution, you can set the VerticalAlignment property to xlVAlignDistributed when the value of the Orientation property is xlVertical, and you can set the HorizontalAlignment property to xlHAlignDistributed when the value of the Orientation property is xlHorizontal.

Example

This example sets the horizontal alignment for text in cell A1 on Sheet1 to equal distribution and then indents the text.

With Worksheets("Sheet1").Range("A1")
    .HorizontalAlignment = xlHAlignDistributed
    .AddIndent = True
End With