In VB, the
Asc functions return the numeric code of a character.
Asc (strExpression) AscB (strExpression) AscW (strExpression)
strExpression argument is a string for which you want to return the numeric code of the first character.
Dim intAnsi as Integer intAnsi = Asc("Hello")
The above example places the value
72 (the ANSI code for the character H) in the variable
Asc function returns the numeric ANSI value of the first character in the supplied string. The range of returns is 0 to 255 on the non-DBCS systems and -32768 to 32767 on DBCS systems.
AscB function in VB is used with byte strings. Instead of returning the character code for the first character,
AscB returns the first byte.
AscW function returns the Unicode character code, except on platforms where Unicode is not supported; in those cases, the behavior of
AscW is identical to the Asc function.