Changes

Jump to: navigation, search

Visual Basic Modules and Procedures

26 bytes added, 20:35, 31 July 2007
Defining Visual Basic Functions
''scope'' Function ''functionName(parameters)'' As ''datatype''<br>
The scope value is either ''Private'' or ''Public'' depending on whether the Function is to be accessable accessible from Visual Basic code outside of the current module. ''Function'' is the Visual Basic keyword indcates which indicates that this is a Function rather than a Subroutine. ''functionName'' is the name of the function. ''parameters'' allows the parameters accepted by this Function to be defined. Finally, ''datatype'' defines the type of value returned by the Function.
With this syntax in mind we can create a Function for application which will accept the String text values from our two text fields as parameters, perform the calculation and return the resultas an Integer:
<pre>

Navigation menu