Microsoft Office 2000/Visual Basic Programmer's Guide   

Naming Variables and Constants

Naming conventions typically use a lowercase prefix or suffix to specify the variable's type and scope. The variable itself should have a meaningful name that describes what it is or what it does. Multiple-word names are concatenated, the first letter of each word is capitalized, and the underscore character is not used. If you used a variable-name template, it would be in the form prefixNoun or prefixNounVerb.

Constant names should also be descriptive names in the NOUN or NOUN_VERB format. Constant names are uppercase and use an underscore character to separate words. Although there is nothing technically wrong with adding characters to constant names to specify data type and scope, it is typically not done. A constant is really the same thing as a variable in the sense that both are symbolic representations of data. The difference is that variables can change and constants remain, well, constant.

Both variable and constant names can contain up to 255 characters; however, names that exceed about 25 to 30 characters can become unwieldy. Besides, 25 or 30 characters should be plenty of room to provide descriptive names that clearly convey the purpose of the variable or constant.