我有一个录制的宏应该将数据透视表中的业务单位从all更改为European Consolidation,但每当我运行宏时,我都会收到“无法设置CurrentPage属性”错误。
我的代码:
ActiveSheet.PivotTables("ECBv1.0") _
.PivotFields("[Business_Unit].[Business Unit Hierarchy].[Business]") _
.ClearAllFilters
ActiveSheet.PivotTables("ECBv1.0") _
.PivotFields("[Business_Unit].[Business Unit Hierarchy].[Business]") _
.CurrentPage = "[Business_Unit].[Business Unit Hierarchy].[Business].&[European Consolidation]"
我有什么办法可以解决这个错误吗?