Refresh Pivots to and OLAP

Grizlore

Active Member
Joined
Aug 22, 2006
Messages
259
Hi All,

Hopefully there is a simple solution, maybe just a check if nothing is changed on the pivot... (?)

The simple code below refreshes several pivot tables, which are linked to an OLAP Cube. I would like to add a piece of code in, so that if the User doesn’t have access to the OLAP Cube, then another piece of code runs.

Code:
Sub RefreshAllPivots()

   Dim PC As PivotCache
   For Each PC In ActiveWorkbook.PivotCaches
      PC.Refresh
   Next PC

End Sub

Currently when the Users run this code (which happens automatically) they are not always aware that they are not looking at the most up-to-date info. As the code doesn’t error if they do not have access to the OLAP Cube.
Is there a simple check that can be triggered?

Any help would be appreciated
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Forum statistics

Threads
1,214,936
Messages
6,122,340
Members
449,079
Latest member
rocketslinger

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top