Gets or sets the vertical alignment for the specified range.
[Visual Basic] Property VerticalAlignment As XlVAlign [C#] XlVAlign VerticalAlignment { get; set; } [C++] __property XlVAlign get_VerticalAlignment(); __property void set_VerticalAlignment(XlVAlign ); [JScript] function get VerticalAlignment() : XlVAlign function set VerticalAlignment(XlVAlign);
One of the XlVAlign values.
This example centers the contents of the row two vertically.
[C#]
book.Worksheets[1].Range.Rows[2].VerticalAlignment = XlVAlign.xlVAlignCenter;
[Visual Basic]
book.Worksheets(1).Range.Rows(2).VerticalAlignment = XlVAlign.xlVAlignCenter;
[C++]
book->Worksheets->Item[1]->Range->Rows->Item[2]->VerticalAlignment = XlVAlign::xlVAlignCenter;
IRange Interface | NativeExcel Namespace | XlVAlign Enumeration | HorizontalAlignment Property