DataChange Event
Occurs when certain properties are changed or when certain methods are executed in the specified PivotTable view.
Private Sub Form_DataChange(ByVal Reason As Long)
Reason Use the value of the PivotDataReasonEnum constant to determine the reason that this event was triggered.
PivotDataResonEnum can be one of these PivotDataResonEnum constants. |
plDataReasonAdhocFieldAdded |
plDataReasonAdhocFieldDeleted |
plDataReasonAdhocMemberChanged |
plDataReasonAllIncludeExcludeChange |
plDataReasonAllowDetailsChange |
plDataReasonAllowMultiFilterChange |
plDataReasonAlwaysIncludeInCubeChange |
plDataReasonCommandTextChange |
plDataReasonConnectionStringChange |
plDataReasonDataMemberChange |
plDataReasonDataSourceChange |
plDataReasonDisplayCalculatedMembersChange |
plDataReasonDisplayCellColorChange |
plDataReasonDisplayEmptyMembersChange |
plDataReasonExcludedMembersChange |
plDataReasonExpressionChange |
plDataReasonFieldNameChange |
plDataReasonFieldSetDeleted |
plDataReasonFieldSetNameChange |
plDataReasonFilterContextChange |
plDataReasonFilterCrossJoinsChange |
plDataReasonFilterFunctionChange |
plDataReasonFilterFunctionValueChange |
plDataReasonFilterOnChange |
plDataReasonFilterOnScopeChange |
plDataReasonGroupEndChange |
plDataReasonGroupIntervalChange |
plDataReasonGroupOnChange |
plDataReasonGroupStartChange |
plDataReasonIncludedMembersChange |
plDataReasonInsertFieldSet |
plDataReasonInsertTotal |
plDataReasonIsFilteredChange |
plDataReasonIsIncludedChange |
plDataReasonMemberPropertyDisplayInChange |
plDataReasonMemeberPropertyIsIncludedChange |
plDataReasonOrderedMembersChange |
plDataReasonRecordChanged |
plDataReasonRefreshDataSource |
plDataReasonRemoveFieldSet |
plDataReasonRemoveTotal |
plDataReasonSortDirectionChange |
plDataReasonSortOnChange |
plDataReasonSortOnScopeChange |
plDataReasonSubtotalsChange |
plDataReasonTotalAllMembersChange |
plDataReasonTotalDeleted |
plDataReasonTotalExpressionChange |
plDataReasonTotalFunctionChange |
plDataReasonTotalNameChange |
plDataReasonTotalSolverOrderChange |
plDataReasonUnknown |
plDataReasonUser |
Example
The following example demonstrates the syntax for a subroutine that traps the DataChange event. For this example to work, a reference must be set to the Microsoft Office Web Components 10.0 type library.
Private Sub Form_DataChange(Reason As Long)
If Reason = OWC.plDataReasonDisplayCellColorChange Then MsgBox "The cell display color was changed." End If End Sub