Range.ListHeaderRows 属性 (Excel)

返回指定区域中标题行的数目。 只读 Long

语法

表达式ListHeaderRows

expression 一个表示 Range 对象的变量。

备注

在使用此属性之前,请使用 CurrentRegion 属性查找范围的边界。

示例

本示例将 rTbl 变量设置为活动单元格的当前区域所表示的范围,不包括任何标题行。

Set rTbl = ActiveCell.CurrentRegion 
' remove the headers from the range 
iHdrRows = rTbl.ListHeaderRows 
If iHdrRows > 0 Then 
 ' resize the range minus n rows 
 Set rTbl = rTbl.Resize(rTbl.Rows.Count - iHdrRows) 
 ' and then move the resized range down to 
 ' get to the first non-header row 
 Set rTbl = rTbl.Offset(iHdrRows) 
End If

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。