简体   繁体   中英

Microsoft excel - VBA

I run my macro, and it seems to be working fine until the last part it highlighted this error:

Run-time error '1004'" Application-defined or object-defined error

End With
ActiveSheet.PivotTables("PivotTable1").AddDataField ActiveSheet.PivotTables( _
    "PivotTable1").PivotFields("Impressions"), "Sum of Impressions", xlSum

Hope someone can enlighten this for me, thanks so much in advance!

Regards, Dexter

该错误不是特定的,但我怀疑您的工作表可能缺少名为PivotTable1对象,或者缺少名为Impressions的字段。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM