Returns or sets the horizontal alignment for the specified object. Read/write XlHAlign.
Syntax
property HorizontalAlignment: XlHAlign;
Description
HorizontalAlignment can be one of these XlHAlign constants.
| xlHAlignCenter |
| xlHAlignCenterAcrossSelection |
| xlHAlignDistributed |
| xlHAlignFill |
| xlHAlignGeneral |
| xlHAlignJustify |
| xlHAlignLeft |
| xlHAlignRight |
Example
This example left aligns the range A1:A5 on sheet one.
Workbook.Worksheets[1].Range['A1', 'A5'].HorizontalAlignment := xlHAlignLeft;