|Excel Developer Reference|
Returns or sets a Recordset object that’s used as the data source for the specified query table. Read/write.
expression A variable that represents a QueryTable object.
If this property is used to overwrite an existing recordset, the change takes effect when the Refresh method is run.
If you import data using the object model, data from a Web query or a text query must be imported as a QueryTable, while all other external data can be imported as either a ListObject or a QueryTable.
You can use the QueryTable property of the ListObject to access the RecordSet property.
This example changes the Recordset object used with the first query table on the first worksheet and then refreshes the query table.
|Visual Basic for Applications|