View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default User-defined function not recognized in formula

Well, first of all, what is the name of your function? It is quite
likely that Excel's Autocorrect feature recognizes it as a word that
is on the list of words to correct. On the Tools menu, choose
AutoCorrect Options, and then see if your original function name is in
the list. If so, delete that entry from the list or rename the
function. Renaming is probably better if other users are going to use
your function -- otherwise, they'd have to fix their own AutoCorrect
list.

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]



On Sun, 14 Feb 2010 12:16:01 -0800, Hershmab
wrote:

Excel 2003, XP SP3:
I have written VBA code to define a private Boolean function for my current
workbook and inserted it in a new module belonging to that workbook. VBE
clearly recognizes it and does not flag any errors.

But when I reference the function in a formula (spelled correctly with
upper-case letters where appropriate) the spelling gets altered and the cell
shows #VALUE! When I try to debug the code, there is no evidence that it has
been entered at all.

I have previously tried creating the function under a different name and
placed it in other modules in other workbooks (in my XLSTART folder), but I
had no more success. In some of the tests, the cell value showed as #NAME?
instead.

What am I doing or not doing?