RefreshStyle Property Example

This example adds a query table to Sheet1. The RefreshStyle property adds rows to the worksheet as needed, to hold the data results.

Dim qt As QueryTable
Set qt = Sheets("sheet1").QueryTables _
    .Add(Connection:="Finder;c:\myfile.dqy", _
        Destination:=Range("sheet1!a1"))
With qt
    .RefreshStyle = xlInsertEntireRows
    .Refresh
End With