Description
Returns the character code corresponding to the first letter in a string.
Syntax
Asc(string)
The string named argument is any valid string expression. If the string contains no characters, and run-time error occurs.
See Also
Chr Function.
Example
This example uses the Asc function to return and character code corresponding to the first letter in the string.
MyNumber = Asc ("A") ' Returns 65. MyNumber = Asc ("a") ' Returns 97. MyNumber = Asc ("Apple") ' Returns 65.