vb中如何返回excel的行数

在vb中,我想知道EXCEL有多少行,用什么函数呢?
2025-02-27 14:14:48
推荐回答(4个)
回答1:

worksheet1.UsedRange.Rows.Count

回答2:

With ActiveSheet.UsedRange
x = .Cells(.Rows.Count, .Columns.Count).Row
y = .Cells(.Rows.Count, .Columns.Count).Column
End With

回答3:

http://topic.csdn.net/t/20060710/15/4870962.html

回答4:

[A65536].End(xlUp).Row