53
CubeField Methods
Name
Parameters
Description
AddMember
PropertyAsString,
Adds a member property field to the
PropertyField
[PropertyOrder]
display for the cube field. Note that the
AsVariant,
property field specified will not be
[PropertyDisplayedIn]
viewable if the PivotTableview has
AsxlPropertyDisplayedIn
no fields
ClearManualFilter
Sets the Visibleproperty to Truefor
all items of a PivotField. It also emp-
ties the HiddenItemsListand
VisibleItemsListcollections in
OLAPPivotTables
CreatePivotFields
Allows you to create PivotFields and
apply filters to them before adding
them to the PivotTable
Delete
Deletes the object
CustomProperty Object and the
CustomProperties Collection
This object allows you to store information within a worksheet or SmartTag. This information can then
be used as metadata for XML, or can be accessed by any routine that needs information specific to the
worksheet or SmartTag.
More important to a developer is the capability of this new object to store specifics regarding a work-
sheet or group of worksheets so any routine can call up the CustomProperty, analyze the information
contained within, and then make decisions on how to handle that worksheet. In the past, many develop-
ers used worksheet-level range names to store information about a worksheet. Worksheet-level range
names only reside in that worksheet, enabling each worksheet to have the same range name, but store
different values.
For example, each worksheet in a workbook containing a dozen budget worksheets and three report
worksheets could contain the same range name, called IsBudget. All of the budget sheets would store
the value of Truein the range name, while the report sheets would store False. Routines that need to
loop through the worksheets, applying different formats or calculations to budget sheets, can call on the
value of the range name to determine if it’s a budget sheet before running code on it.
This new CustomPropertyobject makes storing such information (or any information, for that matter)
simpler than creating worksheet-level range names, or storing such information in a hidden worksheet
or in the Registry.
The CustomPropertiescollection represents CustomPropertyobjects for either worksheets or
SmartTags. CustomPropertiescan store information within either a worksheet or SmartTag. They are
similar to the DocumentPropertiesobject in the Office XPmodel, except they are stored with a work-
sheet or SmartTag instead of the whole document.
724
CubeField Methods