Tuesday, August 10, 2010

Visual Basic String Function : Asc

Purpose : The Asc function return the numeric code of a character

Syntax :
Asc(strExpression)
AscB(strExpression)
AscW(strExpression)

strExpression : String for which you want to return the numeric code of the first character

Dim intAnsi as integer
intAnsi = Asc("Hello")

Return value is 72 because then ANSI code for the character H

No comments:

Post a Comment