This property returns and sets a value that determines the alignment of data in a cell or range of selected cells.
object.CellAlignment [= value]
Constant |
Setting |
Description |
| flexAlignCustom | –1 | Custom |
| flexAlignLeftTop | 0 | Left top |
| flexAlignLeftCenter | 1 | Left center (default for strings) |
| flexAlignLeftBottom | 2 | Left bottom |
| flexAlignCenterTop | 3 | Center top |
| flexAlignCenterCenter | 4 | Center center |
| flexAlignCenterBottom | 5 | Center bottom |
| flexAlignRightTop | 6 | Right top |
| flexAlignRightCenter | 7 | Right center (default for numbers) |
| flexAlignRightBottom | 8 | Right bottom |
| flexAlignGeneral | 9 | General: left center for strings; right center for numbers |
The CellAlignment property is unavailable at design time.