my question refers to the correct call of the DCOUNTA() - function in Basic using
OpenOffice calc.
I've been trying to call the DCOUNTA - function as follows:
Code: Select all
Function dCounta( database As Object, field As Object, criteria As Object )
Dim Funktion as Object
Funktion = createUnoService("com.sun.star.sheet.FunctionAccess")
Dim Argumente(2) As Variant
Argumente(0) = database
Argumente(1) = field
Argumente(2) = criteria
dCounta = Funktion.callFunction( "DCOUNT", Argumente() )
End Function
field = currentWorksheet.getCellRangeByName("A1:B2"))
I'm only getting an IllegalArgumentException without any commentary.
Could anyone please give an example on how to call the function correctly?
Thanks and regards
Den