CHR(charcode)

Returns the character with the corresponding ANSI number (String).


charcodeThe number that identifies a character (Long).

REMARKS
* This function can be used to return both printable and unprintable characters.
* Numbers from 0 - 31 are the same as standard, nonprintable ASCII codes. For example, Chr(10) returns a linefeed character. The normal range for number is 0 - 255.
* You can use the ASC function to return the ANSI number for the first character in a text string.
* You can use the CHR$ function to return a String data type instead of a Variant/String data type.
* You can use the CHRB function is used with byte data contained in a String. Instead of returning a character, which may be one or two bytes, ChrB always returns a single byte.
* You can use the CHRB$ function to return a String data type instead of a Variant/String data type.
* You can use the CHRW function to return a String containing the Unicode character except on platforms where Unicode is not supported, in which case, the behaviour is identical to the Chr function.
* You can use the CHRW$ function return a String data type instead of a Variant/String data type.
* Visual Basic for the Macintosh does not support Unicode strings. Therefore, ChrW(n) cannot return all Unicode characters for n values in the range of 128 - 65,535, as it does in the Windows environment. Instead, ChrW(n) attempts a "best guess" for Unicode values n greater than 127. Therefore, you should not use ChrW in the Macintosh environment.
* The equivalent Excel function is Application.WorksheetFunction.CHAR
* The equivalent .NET function is Microsoft.VisualBasic.Strings.Chr
* For the Microsoft documentation refer to docs.microsoft.com

Chr(9) = tab 
Chr(10) = line feed
Chr(13) = carriage return
Chr(32) = space
Chr(65) = "A"
Chr(70) = "F"
Chr(90) = "Z"
Chr(97) = "a"
Chr(122) = "z"

© 2019 Better Solutions Limited. All Rights Reserved. © 2019 Better Solutions Limited Top