Collapse the table of content
Expand the table of content
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

Range.InsertIndent Method (Excel)

Adds an indent to the specified range.

expression .InsertIndent(InsertAmount)

expression A variable that represents a Range object.

Parameters

Name

Required/Optional

Data Type

Description

InsertAmount

Required

Long

The amount to be added to the current indent.

Using this method to set the indent level to a number less than 0 (zero) or greater than 15 causes an error.

Use the IndentLevel property to return the indent level for a range.

This example decreases the indent level in cell A10.

With Range("a10") 
 .InsertIndent -1 
End With
Show:
© 2016 Microsoft