Can we use regular spreadsheet functions in Basic functions?

For example, can Vlookup be included in a Basic function/ And if so, what is the format to use?
Would it be =vlookup(w,x,y,z) or =vlookup(w;x;y;z) ?

And is there something that needs to precede the function name? Thanks.

Yes. Example:


function MYFKT (byVal x as double) as double
dim oFunction as variant
oFunction = createUnoService("com.sun.star.sheet.FunctionAccess")
dim aArgument(2) as variant
dim result as double
aArgument(0)=x
aArgument(1)=2
aArgument(2)=3
result = oFunction.callFunction( "FDIST", aArgument() )
MYFKT = result
end function

This is more of a currying than a function.

I think this this should answer your question:

http://www.oooforum.org/forum/viewtopic.phtml?t=24943