TABLE 1: A Sample Standard Naming Convention List
VB Script Convention Prefixes
g_ Global: (public to the Application)
m_ Module-level global: (private to the module)
L_ Localizable content.
No prefix on variables in Subs or Functions
Data Type
int Integer
lng Long
rg Array
f Boolean
b Byte
cur Currency
dt Date Time
err Error
str String
ch Character
var Variant
obj Object
con Active Data Object connection
fld Active Data Object Field
prm Active Data Object Parameter
rst Active Data Object RecordSet
col Collection
c: Count
id Identifier
I Index
max Maximum
min Minimum
  • Use Option Explicit always.
  • Use a capital letter as the first letter of all sub and function names.
  • Use constants whenever possible.
  • Use the convention of initial capital letters for words in variable names.
  • Start all subs and functions with a verb.
  • Make objects read object.action.
  • Use From and For to limit criteria.
  • Pass parameters by value.
  • Donít give objects properties or global variables (stateless objects).
  • Donít use Tabs, use 2 spaces.
  • Place VB script for subs and functions after HTML.
  • Capitalize HTML tags.
  • Place Java script before the </HEAD> tag.
  • Separate the code from the % characters by a blank space.
  • Use <> "" to indicate that a string is not empty.
  • Put comments in <% Ď %> not <!-- -->.
Include files
.txt Files containing no scripting or HTML
.incConsists entirely of constants
.aspContains scripting and might contain HTML