Skip to content

Latest commit

 

History

History
46 lines (28 loc) · 1.51 KB

Excel.Range.AddIndent.md

File metadata and controls

46 lines (28 loc) · 1.51 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Range.AddIndent property (Excel)
vbaxl10.chm144075
vbaxl10.chm144075
Excel.Range.AddIndent
47cfb2a4-9050-354f-08f6-e86f0164be02
05/10/2019
medium

Range.AddIndent property (Excel)

Returns or sets a Variant value that indicates if text is automatically indented when the text alignment in a cell is set to equal distribution (either horizontally or vertically).

Syntax

expression.AddIndent

expression A variable that represents a Range object.

Remarks

Set the value of this property to True to automatically indent text when the text alignment in the cell is set, either horizontally or vertically, to equal distribution.

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

[!includeSupport and feedback]