
[英]Run-time error '1004': PasteSpecial method of Range class failed
[英]Run-time error 1004: RefreshTable method of PivotTable class failed
我正在尝试创建一个宏以在单击同一个选项卡中的所有数据透视表后自动刷新一些数据透视表。 当我运行宏时,我收到该错误消息。 如果我一一手动刷新它们,它就可以正常工作。 同样使用 F8 我看到问题出现在第三个 PT 之后。 知道如何解决吗?
Sub RefreshPivotTables()
Dim PL as PivotTable
Worksheets("Overview"). Activate
For Each PL in ActiveSheet. PivotTables
PL.RefreshTable
Next PL
End Sub
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.