Microsoft Office Tutorials and References
In Depth Information
20.7.1 AutoShow-Related Members
AddPageItem<v10>
DatabaseSort<v10>
LayoutSubtotalLocation<v9>
Application
DataRange
MemoryUsed
AutoShow
DataType
Name
AutoShowCount
Delete
NumberFormat
AutoShowField
DragToColumn
Orientation
AutoShowRange
DragToData<v9>
Parent
AutoShowType
DragToHide
ParentField
AutoSort
DragToPage
ParentItems
AutoSortField
DragToRow
PivotItems
AutoSortOrder
DrilledDown<v9>
Position
BaseField
EnableItemSelection<v10>
PropertyOrder<v10>
BaseItem
Formula
PropertyParentField<v10>
CalculatedItems
Function
ServerBased
Calculation
GroupLevel
ShowAllItems
Caption<v9>
HiddenItems
SourceName
ChildField
HiddenItemsList<v10>
StandardFormula<v10>
ChildItems
IsCalculated
SubtotalName<v9>
Creator
IsMemberProperty<v10>
Subtotals
CubeField<v9>
LabelRange
TotalLevels
CurrentPage
LayoutBlankLine<v9>
Value
CurrentPageList<v10>
LayoutForm<v9>
VisibleItems
Let us take a look at some of these members.
20.7.1 AutoShow-Related Members
The AutoShow method is used to restrict the display of pivot items for a given pivot field. The
syntax is:
PivotFieldObject.AutoShow(Type, Range, Count, Field)
All parameters are required for this method.
The Type parameter has two possible values: xlAutomatic activates the remaining parameters
and, thereby, causes the restrictions to take effect, and xlManual disables the remaining
parameters and causes Excel to remove any restrictions caused by a previous call to this method
with Type equal to xlAutomatic .
The other parameters can be described by the following sentence: restrict pivot items to the top
( Range = xlTop ) or bottom ( Range = xlBottom ) Count pivot items based on the value in
pivot field Field .
Thus, for instance, referring to Figure 20-10 , the code:
ActiveSheet.PivotTables("Sales&Trans"). _
PivotFields("Store Type").AutoShow _
xlAutomatic, xlTop, 1, "Sale"
shows the top ( Range = xlTop and Count =1) Store Type based on the value of Sale. The result
is shown in Figure 20-24 .
Search JabSto ::




Custom Search