Applies To
Legend Object, PivotField Object, PivotItem Object, Toolbar Object.
Description
Returns or sets the position of the specified object, as shown in the following table. Read-write.
Object |
Position |
Legend |
Position of the legend on the chart. One of xlBottom, xlCorner, xlTop, xlRight, or xlLeft. |
PivotField |
Position of the field (first, second, third, and so on) among all the fields in its orientation (Rows, Columns, Pages, Data). |
PivotItem |
Position of the item in its field, if the item is currently showing. |
Toolbar |
Position of the toolbar. One of xlTop, xlLeft, xlRight, xlBottom, or xlFloating. |
Example
This example sets the pivot field that contains the active cell to position one.
Worksheets("Sheet1").Activate ActiveCell.PivotField.Position = 1
This example displays the position number of the pivot item that contains the active cell.
Worksheets("Sheet1").Activate MsgBox "The active item is in position number " & _ ActiveCell.PivotItem.Position