Excel vba refresh wait

I was working with a PowerPivot model, and I wanted to Refresh the data before I saved and closed the Model. However, excel just closed the model before the refresh was complete, and the model resumed refreshing on opening. Adding the following line right after the RefreshAll method, did the trick: ThisWorkbook.RefreshAll Application.CalculateUntilAsyncQueriesDone I hope … Read more