Free Guides
Language Tutorials

Visual Basic
Introduction to VB Functions- Part II
|
11.1 Creating Your Own Functions The general format of a function is as follows: Public Function functionName (Arg As dataType,..........) As dataType or Private Function functionName (Arg As dataType,..........) As dataType
* Public indicates that the function is
applicable to the whole program and |
Example 11.1
In this example, a user can calculate future value of a certain amount of money he has today based
on the interest rate and the number of years from now supposing he will invest this amount of money
somewhere .The calculation is based on the compound interest rate.
|