CChar Function |
No
CChar( expression )
Any string expression
A value of type Char
Converts the first character in a string expression to a Char data type
CChar extracts the first character of expression and converts it to a Char data type.
MsgBox(CChar("abc")) ' Displays a MsgBox(CChar("56")) ' Displays 5
If you wish to convert a numeric code to its corresponding Char data type, use the ChrW function.
Like most of the conversion functions, CChar is not actually a function in the Microsoft.VisualBasic namespace. Instead, it is similar to a Visual C++ macro; the compiler translates the function call into inline code.
Chr, ChrW Functions