Share via


QueryTable.FetchedRowOverflow Property

Excel Developer Reference

True if the number of rows returned by the last use of the Refresh method is greater than the number of rows available on the worksheet. Read-only Boolean.

Syntax

expression.FetchedRowOverflow

expression   A variable that represents a QueryTable object.

Remarks

If you import data 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 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 FetchedRowOverflow property.

Example

This example refreshes query table one. If the number of rows returned by the query exceeds the number of rows available on the worksheet, an error message is displayed.

Visual Basic for Applications
  With Worksheets(1).QueryTables(1)
    .Refresh
    If .FetchedRowOverflow Then
        MsgBox "Query too large: please redefine."
    End If
End With

See Also