O'Reilly logo

Visual Basic® Style Guide, The by Tim Patrick

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Instantiation Standards

Now that you have decided on names for your variables, constants, controls, and other elements of your application, it is time to put them into active use. Instantiation is the process of adding declaration elements to your source code.

Instantiation of Variables

Because all of your modules will contain the Option Explicit statement, you are required by the Visual Basic development environment to declare every variable before use. Take care in declaring your variables, as these declarations will determine the range of values available for each variable. Declare your variables in known locations, and in a consistent manner.

Visual Basic contains six types of variable declaration: global, module, local, static, passed, and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required