返回指定区域中标题行的数目。
Long 类型,只读。
语法
表达式.ListHeaderRows
表达式 一个代表 Range 对象的变量。
说明
在使用该属性前,先使用 CurrentRegion
属性查找区域的边界。
示例
本示例将变量 rTbl
设置为活动单元格所在的当前区域,但不包含任何标题行。
示例代码 |
let rTbl = ActiveCell.CurrentRegion
//remove the headers from the range
let iHdrRows = rTbl.ListHeaderRows
if(iHdrRows > 0) {
//resize the range minus n rows
rTbl = rTbl.Resize(rTbl.Rows.Count - iHdrRows)
//and then move the resized range down to
//get to the first non-header row
rTbl = rTbl.Offset(iHdrRows)
}
|