Export (0) Print
Expand All

Orientation Property [Excel 2003 VBA Language Reference]

Office 2003

MsoTextOrientation can be one of these MsoTextOrientation constants.
msoTextOrientationDownward
msoTextOrientationHorizontal
msoTextOrientationHorizontalRotatedFarEast
msoTextOrientationMixed
msoTextOrientationUpward
msoTextOrientationVertical
msoTextOrientationVerticalFarEast

expression.Orientation

expression Required. An expression that returns a TextFrame object.

XlOrientation can be one of these XlOrientation constants.
xlDownward
xlUpward
xlHorizontal
xlVertical

expression.Orientation

expression Required. An expression that returns a Style object.

XlPageOrientation can be one of these XlPageOrientation constants.
xlPortrait
xlLandscape

expression.Orientation

expression Required. An expression that returns a PageSetup object.

XlPivotFieldOrientation can be one of these XlPivotFieldOrientation constants.
xlColumnField
xlDataField
xlHidden
xlPageField
xlRowField

expression.Orientation

expression Required. An expression that returns one of the above objects.

XlTickLabelOrientation can be one of these XlTickLabelOrientation constants.
xlTickLabelOrientationAutomatic
xlTickLabelOrientationHorizontal
xlTickLabelOrientationVertical
xlTickLabelOrientationDownward
xlTickLabelOrientationUpward

expression.Orientation

expression Required. An expression that returns a TickLabels object.

The text orientation. Can be an integer value from – 90 to 90 degrees. One of the following read/write integer or Variant values:

xlDownward
xlHorizontal
xlUpward
xlVertical

expression.Orientation

expression Required. An expression that returns one of the above objects.

Remarks

For OLAP data sources, setting this property for one field in a hierarchy sets the orientation for the other fields in the same hierarchy. Dimension fields can only be oriented in the row, column, and page field areas of the PivotTable report. Measure fields can only be oriented in the data area. Setting a hierarchy or data field to xlHidden removes the hierarchy or field from the PivotTable report.

Example

This example displays the orientation for the ORDER_DATE field.

Set pvtTable = Worksheets("Sheet1").Range("A3").PivotTable
Set pvtField = pvtTable.PivotFields("ORDER_DATE")
Select Case pvtField.Orientation
    Case xlHidden
        MsgBox "Hidden field"
    Case xlRowField
        MsgBox "Row field"
    Case xlColumnField
        MsgBox "Column field"
    Case xlPageField
        MsgBox "Page field"
    Case xlDataField
        MsgBox "Data field"
End Select
				

This example sets Sheet1 to be printed in landscape orientation.

Worksheets("Sheet1").PageSetup.Orientation = xlLandscape
				




Show:
© 2014 Microsoft