Bookshelf Home | Contents | Index | Search | PDF |
Siebel VB Language Reference > Siebel VB Language Reference >
Asc Function
This standard VB function returns an integer corresponding to the ANSI code of the first character in the specified string.
Syntax
Asc(string)
Returns
An integer corresponding to the ANSI code of the first character in the argument.
Usage
To change an ANSI code to string characters, use Chr.
Example
This example asks the user for a letter and returns its ANSI value.
Sub Button_Click
Dim userchar As String
Dim ascVal as Integer
userchar = "Z"
ascVal = Asc(userchar)
End SubSee Also
Bookshelf Home | Contents | Index | Search | PDF |
Siebel VB Language Reference Published: 18 June 2003 |