Share via


Range.Justify Method

Rearranges the text in a range so that it fills the range evenly.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Function Justify As Object
'Usage
Dim instance As Range
Dim returnValue As Object

returnValue = instance.Justify()
Object Justify()

Return Value

Type: System.Object

Remarks

If the range isn’t large enough, Microsoft Excel displays a message telling you that text will extend below the range. If you click the OK button, justified text will replace the contents in cells that extend beyond the selected range. To prevent this message from appearing, set the DisplayAlerts property to False. After you set this property, text will always replace the contents in cells below the range.

See Also

Reference

Range Interface

Range Members

Microsoft.Office.Interop.Excel Namespace