Refresh background query in Excel 2007

F

F Jones

Hello

I have a macro which refreshes an OLAP cube. I want a message to pop up
afterwards to say data has refreshed but it pops up too early and the data is
still refreshing in the background. I think i need to turn off Refresh
background query in the Data connections properties but it is greyed out and
I can't change it. I am using Excel 2007.

I've tried a Do events switch on and off but that didn't help. And i tried
this bit of code but still have same problem.

Sub Refresh_all_Button_Click()
application.enableevents=false
ActiveWorkbook.RefreshAll
application.enableevents=true

Range("k2")=date
MsgBox "Refresh is complete"
End Sub


Any other suggestions very welcome - Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top