Method: Asc for VBS
- Updated2024-09-12
- 1 minute(s) read
Methods > Method: Asc for VBS
Method: Asc for VBS
Specifies the ANSI character code of the first character of a character string.
vAsc = Object.Asc(string)
| Object | VBS Object with this method. You do not need to specify this object. |
| string | Variant Specifies a character string. |
| vAsc | Variant Receives the ANSI character code. |
The following example displays the ANSI character code of various character strings:
Call MsgBox(Asc("A")) ' Returns 65 Call MsgBox(Asc("a")) ' Returns 97 Call MsgBox(Asc("Austin")) ' Returns 65