query tables

G

Guest

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
 
G

Guest

Ezil,

Here's one way:

Dim qry As QueryTable

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top