Question : How to make vba wait for Cube formulas to calculate?

I found that according to MS, OLAP based connection are always backgroundquery=False
To my supprise I found that code which steps through elements in a pagefield of a freeform excel cube report does not allow the cubeformluas to finish calculation before continuing the VBA code. Would anyone have an idea to how I could make vba wait for the connection to finish retrieval. I have tested wait, doevents and another example from http://www.ozgrid.com/forum/showthread.php?t=59219 but nothing made my day.
thx carsten

Answer : How to make vba wait for Cube formulas to calculate?

This works for me in 2010:
1:
2:
3:
4:
5:
Private Sub Worksheet_PivotTableChangeSync(ByVal Target As PivotTable)

'code inside here will execute after OLAP Pivot refresh

End Sub
Random Solutions  
 
programming4us programming4us