See Also Example
Returns a numeric value that is the ANSI
Syntax
Asc(stringexpression)
Remarks
If the stringexpression argument is a zero-length String or a Null
ANSI Character Set
Chr, Chr$ Function
The example uses the Asc function to return the numeric equivalent of a range of characters. To try this example, paste the code into the Declarations section of a form. Then press F5 and click the form.
Sub Form_Click ()
Dim I, Msg ' Declare variables.
For I = Asc("A") To Asc("Z") ' From A through Z.
Msg = Msg & Chr(I) ' Create a string.
Next I
MsgBox Msg ' Display results.
End Sub