CHRW

CHRW(charcode)

Returns the character with the corresponding Unicode number (Variant / 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.
* The normal range for number is 0 - 65,535.
* You can use the ASC function to return the ASCII / ANSI number for the first character in a text string.
* You can use the ASCW function to return the Unicode number for the first character in a text string.
* You can use the CHR function to return the character with the corresponding ASCII / ANSI number.
* You can use the CHRW$ function return a String data type instead of a Variant data type.
* The equivalent Excel function is Application.WorksheetFunction.CHAR
* The equivalent .NET function is Microsoft.VisualBasic.Strings.Chr
* For more information, refer to the Unicode Characters page.
* For the Microsoft documentation refer to learn.microsoft.com

Debug.Print ChrW(9)          '= tab  
Debug.Print ChrW(10) '= line feed
Debug.Print ChrW(13) '= carriage return
Debug.Print ChrW(32) '= space
Debug.Print ChrW(65) '= "A"
Debug.Print ChrW(70) '= "F"
Debug.Print ChrW(90) '= "Z"
Debug.Print ChrW(97) '= "a"
Debug.Print ChrW(122) '= "z"
Debug.Print ChrW(AscW("A")) '= "z"

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