Jörg Schmidt schrieb:
Function FOO_X(x, y)
If x < y Then
tmp = x
ElseIf y < x Then
tmp = y
Else
tmp = x
End If
FOO_X = D1*24*K1*tmp
End Function
Sollten die Variablen 'D1' und 'K1' nicht besser ebenfalls übergeben ...
Function FOO_XXX()
oFunctionAccess = createUnoService("com.sun.star.sheet.FunctionAccess")
Dim args(1) As Variant
With ThisComponent.Sheets(0)
args(0) = .getCellRangeByName("J1").Value
args(1) = .getCellRangeByName("D4").Value
End With
result = oFunctionAccess.callFunction("Min", args())
FOO_XXX = D1*24*K1*result
End Function
... respektive per '.getCellRangeByName("D1").Value' usw. ausgelesen werden?
Wolfgang
--
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]