在 VBA 中使用 WITH 刷新 Excel 2016 数据透视表失败?

时间:2021-04-07 16:16:18

标签: excel vba pivot-table with-statement

此代码有效:

Activesheet.PivotTables("PivotTable1").PivotCache.RefreshTable

此代码不支持,返回错误信息“对象不支持此属性或方法”:

With Activesheet
   .PivotTables("PivotTable1").PivotCache.RefreshTable
End With

为什么?

0 个答案:

没有答案