Hi,

i want to refresh specific workbook query based on its name:

Sub RefreshAllOutputQueries()

    Dim wbQr As WorkbookQuery

    For Each wbQr In ThisWorkbook.Queries
        If wbQr.Name Like "*Out" Then
            wbQr.Refresh False
        End If
    Next wbQr

End Sub
but it is failing. How can i do this?
Best,
Jacek