
Chapter 16
FUNCTIONS IN VISUAL BASIC
F
unctions may be inbuilt or user-defined. We will discuss here only inbuilt
Visual Basic functions.
1. Asc ()
Returns an ASCII value of the first character in the string.
Example:
Expression Return Value
Result = Asc(“M”) 77
Result = Asc(“Mahesh”) 77
Result = Asc(“m”) 109
2. CBool ()
Converts its arguments to a Boolean function and returns False for a zero value
and True for all other values.
303