PDA

View Full Version : [SOLVED] Refresh Pivots w/ Remote Data



Arty-G
07-07-2004, 07:45 AM
I am trying to apply the solution provided in the "Solved: Auto Refresh Pivot Table..." thread. However, my data is in a separate worksheet from my pivots. Neither of the two methods I've tried (below) are cutting it. I think I just need to point the connect property of my PivotCache to my worksheet, but I don't know quite how to do that. Ideas? :dunno


ActiveSheet.PivotTables("PivotTable2").RefreshTable

ActiveSheet.PivotTables("PivotTable2").PivotCache.Refresh

Thanks for all the help I've already received from this impressive forum! -Arty

stapuff
07-07-2004, 07:56 AM
Arty -

In your macro you need to select the sheet with the pivot table that needs to be updated or you pivot table is not named pivot table 2.

Stapuff

stapuff
07-07-2004, 07:57 AM
Arty -

Post your macro and names of the sheets and pivot tables.

Kurt

tommy bak
07-07-2004, 08:01 AM
if you are able to refresh manually, the code should work.
If the name isn't correct it will fail. Try this instead, if you're not sure about the name.
Please change range("A3") to a cell inside you pivottable.



Private Sub Worksheet_Activate()
ActiveSheet.Range("A3").PivotTable.RefreshTable
End Sub


br
Tommy Bak

Arty-G
07-07-2004, 08:59 AM
Thanks, Tommy and Stapuff. I just needed to select my sheet. I appreciate the help!! - Arty