QueryTable Object

Description

Represents a worksheet table built from data returned from an external data source, such as an SQL server or a Microsoft Access database. The QueryTable object is a member of the QueryTables collection.

Using the QueryTable Object

Use QueryTables(index), where index is the index number of the query table, to return a single QueryTable object. The following example sets query table one so that formulas to the right of it are automatically updated whenever it's refreshed.

Sheets("Sheet1").QueryTables(1).FillAdjacentFormulas = True
Properties

Application property, BackgroundQuery property, Connection property, Creator property, Destination property, EnableEditing property, EnableRefresh property, FetchedRowOverflow property, FieldNames property, FillAdjacentFormulas property, HasAutoFormat property, Name property, Parameters property, Parent property, PostText property, Recordset property, Refreshing property, RefreshOnFileOpen property, RefreshStyle property, ResultRange property, RowNumbers property, SaveData property, SavePassword property, Sql property, TablesOnlyFromHTML property.

Methods

CancelRefresh method, Delete method, Refresh method.