Попробуйте что-то вроде этого:
Sub RefreshData()
Dim ws As Worksheet
Dim qt As QueryTable
For Each ws In ThisWorkbook.Worksheets
For Each qt In ws.QueryTables
qt.Refresh BackgroundQuery = False
Next
Next
MsgBox "Refresh complete"
End Sub
Альтернативный метод:
Sub RefreshData()
Dim cn As WorkbookConnection
For Each cn In ThisWorkbook.Connections
cn.Refresh
Next
End Sub