Returns a string containing the character that represents the passed ASCII code. The reverse of this process can be achieved using the Asc function.
Chr (number)
This function can be used to generate any of the non-printable characters, for example:
Number - (Input, expression, Required)
Specifies an ASCII code within the range of 0-255. A value outside of this range (on non-DBCS systems) will return Error. If Null is passed, the number is assumed to be 0 (i.e. an empty string is returned).
A string value containing a single character represented by the specified ASCII code.
Chr (65) |
Returns “A” |
Chr (“97”) |
Returns “a” |
Chr (13) |
Returns the carriage return character |
Chr (0) |
Returns an empty string |
Chr (Null) |
Returns an empty string |
Chr (Error) |
Returns Error |
Functions are specifically for use in the Macro Editor. Refer to Microsoft's official VB and JScript documentation for scripting equivalents.
Functions | Asc function | Chr function | CSet function | Format function | InStr function | LCase function | Left function | Len function | LSet function | LTrim function | Mid function | Replace function | Right function | RSet function | RTrim function | Space function | String function | TCase function | Trim function | UBound function | UCase function
© 2004-2021 looksoftware. All rights reserved.