只能传 单元格,然后转数组。如下
Function MyTest(rng As Range) Dim arr() As Variant Set arr = rng.Value MyTest = UBound(arr)End Function
这要用ParamArray的。