Refresh background query in Excel 2007
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 -- F Jones |
All times are GMT +1. The time now is 04:14 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com