I am using this code - ActiveSheet.PivotTables("PivotTable2").PivotCache.Refresh in an attempt to refresh a pivot based off an external data source in Excel but every time I run it I get a Run-time error '1004': Application-defined or object-defined error.
I tried simply recording a macro but when I do the macro looks like this
' Macro8 Macro
I think it's because the pivot is based off an external query. What I am trying to do is to have an update pivot macro attached to a button that updates the pivot once the data has been updated which is tied to a parameter query.
I have googled this to death and cannot find an answer.
Thanks for any suggestions.
0 Replies - 3093 Views - Last Post: 29 July 2008 - 01:28 PM
Page 1 of 1