

For example, code to work with files might be placed in a module called FileIO.vb, while mathematical procedures might all reside in a file named Math.vb. When we say logically grouped we mean that the code should be grouped with other code of a similar nature. When writing additional Visual Basic for an application, the code should ideally be logically grouped to together with other source code in a module file. Similarly, any code that has been defined by the developer to handle events from controls in the form will be placed by Visual Studio into a module file called Form1.vb. For example, the code to create a form called Form1 will be placed in a module file named. By default, Visual Studio creates a separate module file for each form in an application containing the code to construct the form.

Visual Basic application source code is structured into module files with a.
