Asc
Returns the ANSI character code corresponding to the first letter in a string.
Structure
Asc(string)
Parameters
The string argument is any valid string expression.
Description
If the string contains no characters, a run-time error occurs.
Example
In the following example, Asc returns the ANSI character code of the first letter of each string:
Dim MyNumber
MyNumber = Asc("A") ' Returns 65.
MyNumber = Asc("a") ' Returns 97.
MyNumber = Asc("Apple") ' Returns 65. |