Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
PivotCache.refresh not working
Hi,
In one of the macros, i am trying to update the connection properties at workbook_open event but getting error "Application-Defined or Object-Defined error" when code comes to pt.PivotCache.Refresh. Below is the code: Public Sub updateProperties() Dim sh As Worksheet, qy As QueryTable Dim pt As PivotTable, pc As PivotCache Dim OldPath As String, NewPath As String NewPath = Sheets("Instructions").Range("C130") For Each pt In ws.PivotTables pt.PivotCache.Connection = _ Application.Substitute(LCase(pt.PivotCache.Connect ion), _ LCase(pt.PivotCache.Connection), LCase(NewPath)) pt.PivotCache.Refresh Next pt Next ws End Sub I have searched for a solution without any luck. Please help. Thanks, Navin |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
RefreshTable vs PivotCache.Refresh | Excel Programming | |||
Can I Turn PivotCache Refresh (Calc) off & on in VBA? | Excel Programming | |||
PivotCache.Refresh | Excel Programming | |||
Background refresh not working | Excel Programming | |||
RefreshTable vs PivotCache.Refresh | Excel Programming |