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

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Forum statistics

Threads
1,223,231
Messages
6,170,885
Members
452,364
Latest member
springate

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