Skip to main content

QueryTable object

Table of contents
  1. Remarks
  2. Example

Represents a worksheet table built from data returned from an external data source, such as a SQL server or a Microsoft Access database.

Remarks

The QueryTable object is a member of the QueryTables collection.

Example

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

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>