By Kardi Teknomo, PhD .

< Previous | Next | VB Tutorial | Contents >

Standard Module

Standard modules (.BAS file name extension) are containers for procedures and declarations commonly accessed by other modules within the application. They can contain
1. public procedures (available to the whole application) or
2. module-level procedure (available only to procedure inside the module)
3. public and private module level declarations of

The code that you write in a standard module isn't necessarily tied to a particular application; if you're careful not to reference forms or controls by name, a standard module can be reused in many different applications

Eventually you might find that there is common code you want to execute in several forms or modules. You don't want to duplicate the code, thus you create a separate module containing a procedure that implements the common code. This separate module should be a standard module. Over time, you can build up a library of modules containing shared procedures.

< Previous | Next | VB Tutorial | Contents >

Rate this tutorial or give your comments about this tutorial

This tutorial is copyrighted .