Using VBA to Update an Existing Web Query : QueryTable « Access « VBA / Excel / Access / Word






Using VBA to Update an Existing Web Query

 
Sub RefreshAllWebQueries()
    Dim QT As QueryTable
    For Each QT In ActiveSheet.QueryTables
        Application.StatusBar = "Refreshing " & QT.Connection
        QT.Refresh
    Next QT
    Application.StatusBar = False
End Sub

 








Related examples in the same category

1.creates a QueryTable object on the active worksheet and sets its data source to a single table from a Web page at the designated location:
2.Building a New Web Query with VBA