Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 788
Default UDF is not executing

I have an custom add-in that has a number of subroutines and UDFs. The
subroutines seem to run fine, but some UDFs are returning #VALUE.

At first I thought it was an error in the program so I set a break point on
the first line of code in the function to determine what the error might
be... however the code isn't making it there.

If I change the name of the function by adding an "a" to the front it works
fine.

Please help -- I have no idea where the conflict is.

Thanks in advance,
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default UDF is not executing

Please post the code of your UDF, the formula with which it is called *and* the values of the arguments. Please check the types of
the arguments (ISTEXT(), ISNUMBER(), .....)

--
Kind regards,

Niek Otten
Microsoft MVP - Excel


"Chris" wrote in message ...
|I have an custom add-in that has a number of subroutines and UDFs. The
| subroutines seem to run fine, but some UDFs are returning #VALUE.
|
| At first I thought it was an error in the program so I set a break point on
| the first line of code in the function to determine what the error might
| be... however the code isn't making it there.
|
| If I change the name of the function by adding an "a" to the front it works
| fine.
|
| Please help -- I have no idea where the conflict is.
|
| Thanks in advance,


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 209
Default UDF is not executing

Besides what Niek has said, you may be calling your UDF an 'illegal' name
that Excel is already using. For example, creating a udf called 'TEXT' or
'FORMAT' or 'VLOOKUP' (i.e. reserved words) is not a good thing and will
bring unexpected results.
--
Hope this helps.
If this post was helpfull, please remember to click on the ''''YES''''
button at the bottom of the screen.
Thanks,
Gary Brown


"Chris" wrote:

I have an custom add-in that has a number of subroutines and UDFs. The
subroutines seem to run fine, but some UDFs are returning #VALUE.

At first I thought it was an error in the program so I set a break point on
the first line of code in the function to determine what the error might
be... however the code isn't making it there.

If I change the name of the function by adding an "a" to the front it works
fine.

Please help -- I have no idea where the conflict is.

Thanks in advance,

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 788
Default UDF is not executing

Thanks... I've figured out where the problem is but now I need help fixing it.

The code I'm using includes functions I wrote in addition to functions that
were written by a previous co-worker. The co-worker went to the trouble of
creating a help file for some of his functions. The functions included in
the help file are the functions that aren't working (my functions and his
other "undocumented" functions work fine).

I can make any function work by changing the name of the function (so that
it isn't linked to the help file). For example, one of the functions is
called "TaxRate" -- if I change the function name to "aTaxRate" it works
fine.

Do you know what the issue might be?

Chris

"Gary Brown" wrote:

Besides what Niek has said, you may be calling your UDF an 'illegal' name
that Excel is already using. For example, creating a udf called 'TEXT' or
'FORMAT' or 'VLOOKUP' (i.e. reserved words) is not a good thing and will
bring unexpected results.
--
Hope this helps.
If this post was helpfull, please remember to click on the ''''YES''''
button at the bottom of the screen.
Thanks,
Gary Brown


"Chris" wrote:

I have an custom add-in that has a number of subroutines and UDFs. The
subroutines seem to run fine, but some UDFs are returning #VALUE.

At first I thought it was an error in the program so I set a break point on
the first line of code in the function to determine what the error might
be... however the code isn't making it there.

If I change the name of the function by adding an "a" to the front it works
fine.

Please help -- I have no idea where the conflict is.

Thanks in advance,

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 209
Default UDF is not executing

Sounds like a 'scope' thing where Excel is getting confused. Since changing
the name works, well....There ya go!
Nice work and have a great weekend!
--
Sincerely,
Gary Brown


"Chris" wrote:

Thanks... I've figured out where the problem is but now I need help fixing it.

The code I'm using includes functions I wrote in addition to functions that
were written by a previous co-worker. The co-worker went to the trouble of
creating a help file for some of his functions. The functions included in
the help file are the functions that aren't working (my functions and his
other "undocumented" functions work fine).

I can make any function work by changing the name of the function (so that
it isn't linked to the help file). For example, one of the functions is
called "TaxRate" -- if I change the function name to "aTaxRate" it works
fine.

Do you know what the issue might be?

Chris

"Gary Brown" wrote:

Besides what Niek has said, you may be calling your UDF an 'illegal' name
that Excel is already using. For example, creating a udf called 'TEXT' or
'FORMAT' or 'VLOOKUP' (i.e. reserved words) is not a good thing and will
bring unexpected results.
--
Hope this helps.
If this post was helpfull, please remember to click on the ''''YES''''
button at the bottom of the screen.
Thanks,
Gary Brown


"Chris" wrote:

I have an custom add-in that has a number of subroutines and UDFs. The
subroutines seem to run fine, but some UDFs are returning #VALUE.

At first I thought it was an error in the program so I set a break point on
the first line of code in the function to determine what the error might
be... however the code isn't making it there.

If I change the name of the function by adding an "a" to the front it works
fine.

Please help -- I have no idea where the conflict is.

Thanks in advance,



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 788
Default UDF is not executing

I found the problem, so I thought I would close the loop.

The problem was that in Auto_Open routine had a call to the .HLP file...
however the name of the file was typed incorrectly -- and I think was not
caught in the error trapping. This "error" resulted in the UDFs not
recognized when called from an Excel SS.

Needle in the haystack.

Chris

"Gary Brown" wrote:

Sounds like a 'scope' thing where Excel is getting confused. Since changing
the name works, well....There ya go!
Nice work and have a great weekend!
--
Sincerely,
Gary Brown


"Chris" wrote:

Thanks... I've figured out where the problem is but now I need help fixing it.

The code I'm using includes functions I wrote in addition to functions that
were written by a previous co-worker. The co-worker went to the trouble of
creating a help file for some of his functions. The functions included in
the help file are the functions that aren't working (my functions and his
other "undocumented" functions work fine).

I can make any function work by changing the name of the function (so that
it isn't linked to the help file). For example, one of the functions is
called "TaxRate" -- if I change the function name to "aTaxRate" it works
fine.

Do you know what the issue might be?

Chris

"Gary Brown" wrote:

Besides what Niek has said, you may be calling your UDF an 'illegal' name
that Excel is already using. For example, creating a udf called 'TEXT' or
'FORMAT' or 'VLOOKUP' (i.e. reserved words) is not a good thing and will
bring unexpected results.
--
Hope this helps.
If this post was helpfull, please remember to click on the ''''YES''''
button at the bottom of the screen.
Thanks,
Gary Brown


"Chris" wrote:

I have an custom add-in that has a number of subroutines and UDFs. The
subroutines seem to run fine, but some UDFs are returning #VALUE.

At first I thought it was an error in the program so I set a break point on
the first line of code in the function to determine what the error might
be... however the code isn't making it there.

If I change the name of the function by adding an "a" to the front it works
fine.

Please help -- I have no idea where the conflict is.

Thanks in advance,

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why are my functions not executing? Charlie Excel Worksheet Functions 1 March 3rd 09 11:21 PM
executing database cyzax7 via OfficeKB.com Excel Programming 5 June 15th 06 08:42 AM
executing an add in Gary Keramidas Excel Programming 6 November 6th 05 09:56 PM
Worksheet_Change Still Not Executing.... [email protected] Excel Programming 0 September 3rd 04 03:35 AM
Code not executing iwrk4dedpr[_6_] Excel Programming 3 June 3rd 04 07:48 AM


All times are GMT +1. The time now is 05:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"