CODE
Sub RefreshAll_Click()
Dim qt As QueryTable
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
For Each qt In ws.QueryTables
[color="red"] qt.Refresh [/color]
Next qt
Next ws
End Sub
Dim qt As QueryTable
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
For Each qt In ws.QueryTables
[color="red"] qt.Refresh [/color]
Next qt
Next ws
End Sub
The highlighted code returns this error:
QUOTE
Run-time error '1004':
Application-defined or object-defined error
Application-defined or object-defined error
I've hunted around for an answer but the error message and words like query are all too common. Any ideas why this would be happening?
Thanks,
Edward