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