Is there a calculation method that waits for an OLAP refresh?

seann

New Member
Joined
Jan 28, 2008
Messages
11
Hi Guys,

I am using Excel 2007 and have a data connection to an OLAP cube. My worksheet has numerous formulas such as cubevalue & cubemember etc. I have finished my report and would like to email it out automatically every morning.

My problem is in the code when I call ActiveWorkbook.RefreshAll to refresh the data this is executed in the background and the code continues to run even though the data hasn't been updated.

I have tried
1.Application.Wait (Now + TimeValue("0:01:00")) although this doesn't work because it also stops the cube query running
2. I have read there is a new calculation method available which may do what I require although the documentation is lacking. The method is CalculateUntilAsyn<wbr>cQueriesDone();

So if anyone knows how to get CalculateUntilAsyn<wbr>cQueriesDone to work or has another way to get this to run in VB your help would be welcome as I am stumped!

Thank you

Seann

P.S Turning of background refresh isn't an option - I am sure there is a way around without resorting to turning background refresh off.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Sorry for not reporting back on this one. The above function does work just after the refresh call.
 
Upvote 0

Forum statistics

Threads
1,214,787
Messages
6,121,569
Members
449,038
Latest member
Guest1337

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