Excel2016 VBA to pause until PowerQuery has updated

KimC2504

Board Regular
Joined
Jul 17, 2012
Messages
141
Code:
Sub PowerQueryRefresh()

    ActiveWorkbook.Connections("Query - Actuals").Refresh
    ActiveWorkbook.Connections("Query - SFDC").Refresh
    ActiveWorkbook.Connections("Query - PW Most Likely").Refresh

    End Sub
Hi All,
I have just upgraded to Excel 2016 and I am wondering if excel 2016 can know get VBA to pause until first query is completed prior to proceeding to 2nd query and then the 3rd query. I don't want to refresh every query in the workbook at once, just the queries identified. I could never get this to work in excel 2013 so I am hopeful...
 

Some videos you may like

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Watch MrExcel Video

Forum statistics

Threads
1,100,193
Messages
5,473,071
Members
406,845
Latest member
JohnR123

This Week's Hot Topics

Top