|
|||||||||||||||||
![]() |
![]() |
![]() |
|||||||||||||||
| General Procedures <VB Tutorial | Contents | Previous | Next > When you make a complex program, the easiest way to handle is to decompose a big program into smaller components. These components are called procedures. There are several types of procedures used in Visual Basic: We suspend the discussion about Property until we discuss about OOP. In this lesson we only discuss Sub procedures and Function procedure. There are two common attributes can be attached to a procedure (Sub or Function): Procedures are by default Public in all modules, which means they can be called from anywhere in the application. The default means if you do not specify the attribute, VB will automatically assume the procedure has Public attribute. Private attribute indicates that the procedure is accessible only to other procedures within the module where it is declared. The following simple project is designed to make you understand the difference beween private and public procedure. Project: Public and Private Procedure
4. Add a standard module into the form. Type the following code into the standard module
5. Run the program and trace the value of each variables <VB Tutorial | Contents | Previous | Next > Rate this tutorial or give your comments about this tutorial Preferable reference for this tutorial is Teknomo, Kardi. Visual Basic Tutorial . http:\\people.revoledu.com\kardi\ tutorial\VB
|
|||||||||||||
|
||||||||||||||
|
||||||||||||||