How to wait until ActiveWorkbook.RefreshAll finishes before executing more code
I had the same issue with an OLEDBConnection connection type, however DoEvents (as suggested in a prior answer) didn’t help me as my data connections had background-refresh enabled. Instead, using Wayne G. Dunn’s answer as a jumping-off point, I created the following solution, which worked: Sub Refresh_All_Data_Connections() For Each objConnection In ThisWorkbook.Connections ‘Get current background-refresh … Read more