ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   query tables (https://www.excelbanter.com/excel-programming/394535-query-tables.html)

ezil

query tables
 
I placed some 15 query tables in one sheet and i want to update all the query
tables.
For that the following command is useful to update one query table. To
update all
I have to repeat the command for 15 times. Is there any single line command
(except "refresh all") that updates all web queries?

ActiveSheet.QueryTables(1).Refresh BackgroundQuery:=False

Vergel Adriano

query tables
 
Ezil,

Here's one way:

Dim qry As QueryTable

For Each qry In ActiveSheet.QueryTables
qry.Refresh BackgroundQuery:=False
Next qry


--
Hope that helps.

Vergel Adriano


"ezil" wrote:

I placed some 15 query tables in one sheet and i want to update all the query
tables.
For that the following command is useful to update one query table. To
update all
I have to repeat the command for 15 times. Is there any single line command
(except "refresh all") that updates all web queries?

ActiveSheet.QueryTables(1).Refresh BackgroundQuery:=False



All times are GMT +1. The time now is 04:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com