Option Explicit
Public Sub Testrun()
Dim l As Long
l = Selection.Row.Count
ActiveCell.Value = l
End Sub
此代码显示424错误:VBA中需要对象。请帮忙。
答案 0 :(得分:1)
使用行代替行
Option Explicit
Public Sub Testrun()
Dim l As Long
l = Selection.Rows.Count
ActiveCell.Value = l
End Sub