SheetPivotTableUpdate 事件

       

发生在数据透视表的工作表更新之后。

Private Sub expression_SheetPivotTableUpdate(ByVal Sh As Object, Target As PivotTable)

expression   引用在类模块中带有事件声明的 Applicaton 类型或 Workbook 类型对象的变量。

Sh   必需。选定的工作表。

Target   必需。选定的数据透视表。

示例

本示例显示一则消息,说明数据透视表已经更新。本示例假定您已在类模块中声明了带有事件的 Application 类型或 Workbook 类型的对象。

Private Sub ConnectionApp_SheetPivotTableUpdate(ByVal shOne As Object, Target As PivotTable)

    MsgBox "The SheetPivotTable connection has been updated."

End Sub