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.
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
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