Position Property

Microsoft Excel Visual Basic

Returns or sets the position of the data label. Read/write XlDataLabelPosition.

XlDataLabelPosition can be one of these XlDataLabelPosition constants.
xlLabelPositionAbove
xlLabelPositionBestFit
xlLabelPositionCustom
xlLabelPositionInsideEnd
xlLabelPositionMixed
xlLabelPositionRight
xlLabelPositionBelow
xlLabelPositionCenter
xlLabelPositionInsideBase
xlLabelPositionLeft
xlLabelPositionOutsideEnd

expression.Position

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

ShowPosition property as it applies to the Legend object.

Returns or sets the position of the legend on the chart. Read/write XlLegendPosition.

XlLegendPosition can be one of these XlLegendPosition constants.
xlLegendPositionCorner
xlLegendPositionRight
xlLegendPositionTop
xlLegendPositionBottom
xlLegendPositionLeft

expression.Position

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

ShowPosition property as it applies to the CubeField and PivotItem objects.

Position of the item in its field, if the item is currently showing. For a CubeFields collection, this is the position of the hierarchy field on the PivotTable report when it’s dragged from the field well. Read/write Long.

expression.Position

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

ShowPosition property as it applies to the PivotField object.

Position of the field (first, second, third, and so on) among all the fields in its orientation (Rows, Columns, Pages, Data). Read/write Variant.

expression.Position

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

Example

This example moves the chart legend to the bottom of the chart.

Charts(1).Legend.Position = xlLegendPositionBottom
		

This example displays the position number of the PivotTable item that contains the active cell.

Worksheets("Sheet1").Activate
MsgBox "The active item is in position number " & _
    ActiveCell.PivotItem.Position