【发布时间】:2015-10-10 21:12:19
【问题描述】:
我不知道如何将单元格区域与函数一起使用。
我搜索了一些示例,但徒劳无功。
我写了以下测试。我在两个“for”行上都收到“Object variable not set”错误(一个没有“RangeAddress”,第二个有它,因为我不确定语法是否正确):
function CHECKBZRANGE(cellRange) as integer
dim nCol as integer
dim nLine as integer
dim i as integer
for nCol = cellRange.StartColumn to cellRange.EndColumn
for nLine = cellRange.RangeAddress.StartRow to cellRange.RangeAddress.EndRow
i = i + 1 ' placeholder for some computation
next nLine
next nCol
checkBZ_range = i
end function
这个函数被一个像=CHECKBZRANGE(A6:C9)这样的单元格调用
有人可以解释如何使用参数传递的单元格范围吗?
【问题讨论】:
标签: libreoffice-calc libreoffice-basic