-
UDF and #NAME?
Hello
In this legacy spreadsheet
I have got the following UDF defined in a module.
Function nb_antenna(nb_sectors As Double) As Double
nb_antenna = 2 * nb_sectors
End Function
now in one of the worksheets, i have in G6 nb_antenna(D6)
and in D6 i have the value 1
which gives a value of 2 in G6
this is the legacy stuff
now when i change 1 to 2 it comes up with #NAME?
I thought it had something to do with security, and i changed the macro settings to the lowest. (what nasties should i be watching out for when i do this?)
but no dice(perhaps i am not doing the security setting change correctly
-
Re: UDF and #NAME?
Can't see anything wrong with the code. The error #NAME usually means that the formula cannot find the function name.
Try putting the word Public before the function in the module to make it Public Function nb_antenna ... etc.
Make sure the function name is spelled correctly in the sheet.