Causes the compiler to report errors if variables are not declared prior to use.
/optionexplicit[+ | -]
The default for this option is /optionexplicit+ which is the same as /optionexplicit. Specify /optionexplicit- if you want to use implicitly declared variables.
Compile in.vb
and check for undeclared variables:
vbc /optionexplicit in.vb