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

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Watch MrExcel Video

Forum statistics

Threads
1,102,292
Messages
5,485,978
Members
407,523
Latest member
Talicius

This Week's Hot Topics

Top