QueryTable.ResultRange (Excel)

Returns a Range object that represents the area of the worksheet occupied by the specified query table.

The range doesn't include the field name row or the row number column. If you import data by using the user interface, data from a web query or a text query is imported as a QueryTable object, while all other external data is imported as a ListObject object. If you import data by 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 ResultRange property.


Dim rngResultRange As Range
Set rngResultRange = ActiveCell.QueryTable.ResultRange