VBA automatically updating variable names

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I defined 2 functions in the same module. One function use lower case 'x' as
the arguement and the other uses upper case 'X' as the arguement(see below).
VBA automatically changes one of the arguements to match the other. It does
the same thing even if I put each of the functions in different modules.

Function fun1(x As Integer)
End Function

Function fun2(X As Integer)
End Function

Can someone please explain this and if I can prevent it? Thanks
 
Be more imaginative and use much more descriptive and unique names for your
function parameters.

Luke
 
Mike,
Considering your argument names are meaningless, you could try another
letter of the alphabet.

NickHK
 
Hi Mike,

Why not try the popular hungarian-type notation? Here are some examples ...

Type - Variable Name
----------------------------------
Boolean blnWasCreated
String strFileName
Long lngRow
Range rngFilter
Variant varUniqueArray

HTH

Regards,
Zack Barresse
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top