Method: AscB for VBS
- Updated2024-09-12
- 1 minute(s) read
Methods > Method: AscB for VBS
Method: AscB for VBS
Specifies the ANSI character code of the first byte of a character string.
vAscB = Object.AscB(string)
| Object | VBS Object with this method. You do not need to specify this object. |
| string | Variant Specifies a character string. |
| vAscB | Variant Receives the ANSI character code. |
The following example displays various character codes:
Call MsgBox(AscB("?")) ' Returns 110 Call MsgBox(AscW("?")) ' Returns 12398 Call MsgBox(Asc("?")) ' Returns 63 Call MsgBox(AscB("n")) ' Returns 110