返回或设置指定工作表中插入或删除行的方式,以提供查询返回的记录集的行数。XlCellInsertionMode 类型,可读写。
XlCellInsertionMode 可为以下 XlCellInsertionMode 常量之一。 |
xlInsertDeleteCells 插入或者删除部分行以适应新记录集所需要的实际行数。 |
xlOverwriteCells 不向工作表添加新的单元格或行。如果溢出则覆盖周围的单元格的内容。 |
xlInsertEntireRows 插入记录集中的所有行,并且允许溢出原有区域。 |
expression.RefreshStyle
expression 必需。该表达式返回“应用于”列表中的对象之一。
本示例向 Sheet1 添加查询表,并对 RefreshStyle 属性进行设置,插入两个新行以放置查询结果数据。
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