This line of code:
ActiveSheet.PivotTables("PivotTable1").Refresh
Gives error 438, "Object does not support this property or method"
In the immediate window:
?activesheet.name
dashb
?activesheet.pivottables("Pivottable1").name
PivotTable1
?activeworkbook.Name
D4_p_TRK.xlsm
Activesheet.pivottables("pivottable1").refresh
All the '?' queries show that the code is pointing exactly where i think it should. The PivotTable name is correctly echoed back for instance.
Even the last line in immediate window gives same Error 438 result.
After the code ends, i can manually refresh this PivotTable (right-click and 'refresh') and there is no error.
PS - This macro used to work and at some point it seems to have stopped working and gives this error.
Any diagnosis?
Thanks!
ActiveSheet.PivotTables("PivotTable1").Refresh
Gives error 438, "Object does not support this property or method"
In the immediate window:
?activesheet.name
dashb
?activesheet.pivottables("Pivottable1").name
PivotTable1
?activeworkbook.Name
D4_p_TRK.xlsm
Activesheet.pivottables("pivottable1").refresh
All the '?' queries show that the code is pointing exactly where i think it should. The PivotTable name is correctly echoed back for instance.
Even the last line in immediate window gives same Error 438 result.
After the code ends, i can manually refresh this PivotTable (right-click and 'refresh') and there is no error.
PS - This macro used to work and at some point it seems to have stopped working and gives this error.
Any diagnosis?
Thanks!