View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default Minor puzzle: some UDF calls respect mixed case, others insist on lower case

Helmut is describing the conditions that I referred to. It is not Excel
playing tricks. It is related to your code and how the VBA compiler stores
your names, variables, etc. in memory. If code is written inconsistently in
respect to case, VBA will use its own logic to determine what is stored in
memory and that is what will be displayed. Doesn't make any difference
whether case displayed is lower, upper or mixed, what you see is what VBA
has in memory for that item. So if you want it to be consistent, then it
will be necessary to review your code to see where the anomaly occurred.



"Prof Wonmug" wrote in message
...
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).

Up until a few days ago, whenever I would code a UDF call in a cell
(=ExpSF(...)), Excel would change the name to lower case
(=expsf(...)). I recall trying repeatedly to get Excel to leave it in
mixed case.

A few days ago, I wrote a new UDF called FmtTime. I just noticed that
all of the calls to this one function are in mixed case just like I
entered them. In fact, if I try to change it to all lower case
(fmttime), Excel changes it back to FmtTime.

What the heck is going on?

Excel is like a lot of girlfriends I've had...can't live with them or
without them.