CellFormat.VerticalAlignment property (Excel)
Returns or sets a Variant value that represents the vertical alignment of the specified object.
expression.VerticalAlignment
expression A variable that represents a CellFormat object.
TThe value of this property can be set to one of the XlVAlign constants.
This example sets the height of row 2 on Sheet1 to twice the standard height, and then centers the contents of the row vertically.
Worksheets("Sheet1").Rows(2).RowHeight = _
2 * Worksheets("Sheet1").StandardHeight
Worksheets("Sheet1").Rows(2).VerticalAlignment = xlVAlignCenter
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.