Naming Conventions

It's become common to put a three-letter prefix onto all object names, to indicate the type of the object being used. This makes it much easier to remember what the object actually is (especially when you're using a lot of labels and text boxes, which are easily confused). The naming conventions that have emerged are as follows:

Object TypePrefixExample
FormfrmfrmDictionary
Picture BoxpicpicHappyFace
LabellbllblTitle
Text BoxtxttxtFirstName
Command Buttoncmd,btnbtnQuit
FramefrafraOptions
Check BoxchkchkMakeLogFile
Option ButtonoptoptColorsRed
Combo BoxcbocboCompany
List BoxlstlstTravelDestination
TimertmrtmrFlashTitle
DatadatdatEmployees
Horizontal Scroll BarhsbhsbVolumeControl
Vertical Scroll BarvsbvsbTrebleControl
Drive List BoxdrvdrvHardDiskContents
DirectoryListBoxdirdirTreeStructure
File List BoxfilfilFiles
ShapeshpshpBox
LinelinlinBorder
ImageimgimgHouse
OLEoleoleSpreadsheet

Visual Basic by Example is hosted by GeoCities
1