Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88066

Refresh all does refresh the connections but doesn't refresh the tables

$
0
0

I have three tables which pull data from SQL database.

When I click refresh all from the data menu, the connections refresh but only sum of the tables are refreshed.

When I right-click>refresh the tables themselves, they reflect the correct information (telling me that the connection was refreshed indeed).

I tried ActiveBook.RefreshAll and the following code too:

Dim wks As Worksheet
Dim qt As QueryTable

For Each wks In Worksheets
    For Each qt In wks.QueryTables
        qt.Refresh BackgroundQuery:=False
    Next qt

Next wks

Set qt = Nothing

How can I refresh the table using VBA code?


Viewing all articles
Browse latest Browse all 88066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>