CellAlignment Property

       

Returns or sets a value that determines the horizontal and vertical alignment of data within the current cell. This property is not available at design time.

Syntax

object.CellAlignment [=value]

The CellAlignment property syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
value An integer or constant that specifies how text should be aligned within the current cell, as described in Settings.

Settings

The settings for value are:

Constant Value Description
flexAlignLeftTop 0 The cell content is aligned left, top.
flexAlignLeftCenter 1 Default for strings. The cell content is aligned left, center.
flexAlignLeftBottom 2 The cell content is aligned left, bottom.
flexAlignCenterTop 3 The cell content is aligned center, top.
flexAlignCenterCenter 4 The cell content is aligned center, center.
flexAlignCenterBottom 5 The cell content is aligned center, bottom.
flexAlignRightTop 6 The cell content is aligned right, top.
flexAlignRightCenter 7 Default for numbers. The cell content is aligned right, center.
flexAlignRightBottom 8 The cell content is aligned right, bottom.
flexAlignGeneral 9 The cell content is of general alignment. This is "left, center" for strings and "right, center" for numbers.