User function routines


Posted by Joan Manley on April 27, 2001 5:48 AM

What is the syntax for using a user written function
routine from the VB code attached to the same workbook?
The routines work if I put them into "personal.xls" and
use =personal.xls!fname(a,b,...) in a cell in any
workbook; but I am unable to get them to work when the
VB code is in the same work book.
I have tried
=wbname.xls!fname(a,b,...)
=fname(a,b,....)
neither of which work as I get a #name error in the
calling cell.
HELP!!!! I know there has to be a way to do this.



Posted by Ivan Moala on April 27, 2001 7:56 AM


If you click on the paste function button and
goto "User defined" you should see your function
here......if not then there could be a number of
reasons why.
1)You have declared the function as Private
eg Private function fname(a,b...)
2) you have the funcion in a Option Private module
3) You have the function in a worksheet code module...


Ivan