Syntax

expression.QueryTables

expression A variable that represents a Worksheet object.

Example

This example refreshes all query tables on worksheet one.

Visual Basic for Applications
For Each qt in Worksheets(1).QueryTables qt.Refresh Next

This example sets query table one so that formulas to the right of it are automatically updated whenever it's refreshed.

Visual Basic for Applications
Sheets("sheet1").QueryTables(1).FillAdjacentFormulas = True
Query Tables Query Tables Property querytables QueryTables Property Return the collection of all querytables on the specified worksheet?

See also: