I am using OOo 2.1.

I can't figure out how to invoke a sub from within a formula. As an example, I 
created the following sub:

sub Hypot(a as Long, b as Long)
  Hypot = a * a + b * b
end sub

I then tried this formula in one of the cells:

=Hypot(3;4)

I expected to generate the value 25 but instead I got #NAME?

Do I misunderstand what the Star Basic subroutines are supposed to do? If not 
then what steps are needed to make this example work? Obviously, this is a very 
simplistic example since I could just as easily entered =3*3+4*4 into the cell. 
The thing is that I want to code the following in more than 80 cells

=if(or(cond1(n);and(not(cond2(n);cond5(n));and(cond2(n);not(cond3(n));cond4(n)))
;"";dat[n))

In this formula, cond1(), cond2(), cond3(), cond4(), cond5(), and dat() are all 
moderately complex in structure.

-- 
Jim

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to