This contains the Microsoft Recommended naming conventions for Objects, and Variables in Visual Basic 6.0.
Why is this here? I believe it is always important to follow some standard when coding, and if your job involves VB programming, then I'm sure you will agree that it definitely makes code easier to read and understand. Most if not all, IT jobs will require you to follow a set of standards while writing your code.
The Visual Basic Coding standards have changed over the years but they are still about the same, with the Scope and Type identifiers to tell if a variable is global, module or local, and what the data type of the variable is. I remember the previous set of standards used only a single character type identifier. (most of the code in this site still uses the old standard, I just have not caught on to the new one yet.) The new standard of the 3 character type identifier makes VB's standards more like that of Visual C++. (I doubt this is coincidence.)
Visual Basic Naming Standards |
Control type | prefix | Example |
3D Panel | pnl | pnlGroup |
ADO Data | ado | adoBiblio |
Animated button | ani | aniMailBox |
Check box | chk | chkReadOnly |
Combo box, drop-down list box | cbo | cboEnglish |
Command button | cmd | cmdExit |
Common dialog | dlg | dlgFileOpen |
Communications | com | comFax |
Control (used within procedures when the specific type is unknown) | ctr | ctrCurrent |
Data | dat | datBiblio |
Data-bound combo box | dbcbo | dbcboLanguage |
Data-bound grid |