For Each conn In ThisWorkbook.Connections
If conn.Type = xlConnectionTypeODBC Or conn.Type = xlConnectionTypeOLEDB Then
' Désactiver la mise à jour en arrière-plan
If conn.OLEDBConnection.BackgroundQuery = True Then conn.OLEDBConnection.BackgroundQuery = False
' Mise à jour de la connexion
conn.Refresh
End If
Next conn
Application.CalculateUntilAsyncQueriesDone