Structuring a Visual Basic Program

One of the goals in modern programming is to produce modular programs — that is, programs composed of small, discrete units of code, each of which acts independently to accomplish a particular task. Toward this end, Visual Basic enables you to organize your code into procedures, modules, and workbooks.

A program built from small, reliable components has many advantages over a program built as a single structure. Well-structured modular programs are:

The rest of this chapter will describe how to organize your code into these components and how to control the interaction among procedures stored in different parts of a program.