VBA function having it's name's case changed in excel  
Author Message
Andrew_Hall





PostPosted: Visual Basic for Applications (VBA), VBA function having it's name's case changed in excel Top

I am just starting with VBA / excel though I am a moderately competent programmer. I created a function B4FirstBlank() (written exactly like that) that looks at a Range reference and finds the value of the cell before the first blank cell. It works fine but whenever I type it into excel it is rewritten as

b4fIRSTbLANK()

which doesn't do much for me in terms of readability. I get other strange rewriting of functions too, any guidance on how to sort this out much appreciated.

Andrew


Microsoft ISV Community Center Forums1  
 
 
duck thing





PostPosted: Visual Basic for Applications (VBA), VBA function having it's name's case changed in excel Top

Typically, the IDE uses the declaration/definition of the function to determine its case throughout the module. Check the definition of your function to make sure that it's formatted correctly -- if not, and you fix it there, the fix should be propagated throughout your code automatically.



 
 
Andrew_Hall





PostPosted: Visual Basic for Applications (VBA), VBA function having it's name's case changed in excel Top

Thanks for the reply. I've had a good look and it is definitely called B4FirstBlank(). For some reason it is now appearing as b4firstblank(). I have also looked for multiple definitions and while I do have the same function amongst my utility functions it has the same name and case and it is easy to test that it is not being used (ie the version in the workbook module is being used).

This isn't a big deal but it is definitely annoying.

Andrew