This example refreshes the first query table on the first worksheet if the table is based on a Web page.
Set qtQtrResults = _
Workbooks(1).Worksheets(1).QueryTables(1)
With qtQtrResults
if .QueryType = xlWebQuery Then
.Refresh
End If
End With