View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Helmut Meukel Helmut Meukel is offline
external usenet poster
 
Posts: 49
Default Minor puzzle: some UDF calls respect mixed case, others insist on lower case

"Prof Wonmug" schrieb im Newsbeitrag
...
On Fri, 30 Apr 2010 13:28:45 -0400, "JLGWhiz"
wrote:

Check your code for the UDF. If you used lower case within the code, it
might be VBA doing the conversion, rather than Excel. I know that I have
been surprised a few times by certain object variables turning up in a
differenct case than originally declared.


As I said in my post, the UDF names are in mixed case (see below).


"Prof Wonmug" wrote in message
. ..
I have a bunch of UDFs that I have used for years hundreds of times in
several workbooks. The names of the UDFs in the add-in modules are
coded in mixed case (RayleighMean, RndTallyLog, & ExpSF).



In VB (and VBA) this may happen if you use the same name twice.
It happend to me when I had a User Defined Type element with the same
name as a local variable. Or a Function in one module and a variable or
UDT element in annother module with the same name. It's allowed if
there is no ambiguity, but VB will use only one case (both same mixed
case or both lowercase or both uppercase).

HTH.

Helmut.