Converts the first character in a String variable or expression into its equivalent ASCII numerical code and returns the Integer result.
...Asc ( string )
Prerequisites
None
Parameters
string
A required String value. The string can be a String variable, constant, method or concatenated value.
Remarks
Given a String variable or expression, the first character in the String is extracted and its equivalent numerical value is returned as an Integer. This routine is convenient if you have a string that contains non-printable characters and you wish to operate on their values.
Examples
Dim ii As Integer
Dim ss As String
ss = Chr(10) ' Line feed character
ii = Asc(ss) ' ii will be set to 10
See Also