Kardi Teknomo
Kardi Teknomo Kardi Teknomo Kardi Teknomo
   
 
  Research
  Publications
  Tutorials
  Resume
  Personal
  Contact

 

Standard Module

By Kardi Teknomo, PhD.

<VB Tutorial | Contents | Previous | Next >

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
• variables,
• constants,
• types

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.

<VB Tutorial | Contents | Previous | Next >

Rate this tutorial or give your comments about this tutorial

This tutorial is copyrighted.

Preferable reference for this tutorial is

Teknomo, Kardi. Visual Basic Tutorial . http:\\people.revoledu.com\kardi\ tutorial\VB

 

 

 

 
© 2007 Kardi Teknomo. All Rights Reserved.
Designed by CNV Media