View Single Post
  #2   Report Post  
Bill Manville
 
Posts: n/a
Default

I don't know, but it may be that Refresh All attempts to do all the
refreshes simultaneously and runs into trouble because there aren't
enough connections to the database.

The following macro should do each one in turn.
Does it work?

Sub RefreshEach()
Dim WS As Worksheet
Dim QT As QueryTable
For Each WS In ThisWorkbook.Worksheets
For Each QT In WS.QueryTables
Debug.Print "Doing " & WS.Name & "!" & QT.ResultRange.Address
QT.Refresh BackgroundQuery:=False
Next
Next
Debug.Print "All done"
End Sub

If it were to fail on one you could see which one in the immediate
window of the VB editor.
Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup