VB Naming Conventions
Under construction.
Please EMAIL me with your suggestions: michael@michael-thomas.com
VB Hungarian Notation:
Standard variables: begin in lower case with the "scope"
prefix, then the "variable type", then using upper and lower case a descriptive
meaning.
Constant variables: follow the stard variable guidelines except
that all of the characters are upper case.
Functions: begin in lower case with the return variable type, then
upper and lower to describe the function.
Examples:
gintNumOfEmp - means global scope, integer variable type,
that has the value of the number of employees.
function strSearchReplace - this is a function that returns a string.
Other Standards
Convention Prefix Table
Category |
Prefix |
Files |
- frm - Forms (.frm files)
- bas - Basic procedure (.bas files)
- cls - Classes (.cls files)
|
Scope |
- g - global
- m - Module
- <none> - Local to procedure
|
Variable Types |
- bln - Boolean
- byt - Byte
- col - Collection object
- cur - Currency
- dtm - Date (Time)
- dbl - Double
- err - Error
- int - Integer
- lng - Long
- obj - Object
- sng - Single
- str - String
- u[xxx] - User-defined Type
- vnt - Variant
|
Objects - common |
- frm - Form
- btn - CommandButton
- chk - CheckBox
|
Objects - other |
- drv - driveListBox
- dir - dirListBox
- lst - FileListBox
- pgr - ProgressBar
- dao - Data Access Object
- fhd - File Header (Numeric Value from the OS for a file header)
|
Objects - user |
- uobj - General User defined object
|
|
|
|
|
|
|
|
|
|
|
Last edited: 12/12/13
|