ASCII Characters
ASCII is currently the standard for the relationship between a number value and a character type.
Note: The characters 1-9 & 11-31 (?? 128-159) are not supported by Windows
1-9 | 58 | : | 87 | W | 116 | t | 145 | | 174 | ® | 203 | Ë | 232 | è | |
10 | 59 | ; | 88 | X | 117 | u | 146 | | 175 | ¯ | 204 | Ì | 233 | é | |
11-31 | 60 | < | 89 | Y | 118 | v | 147 | | 176 | ° | 205 | Í | 234 | ê | |
32 | 61 | = | 90 | Z | 119 | w | 148 | | 177 | ± | 206 | Î | 235 | ë | |
33 | ! | 62 | > | 91 | [ | 120 | x | 149 | | 178 | ² | 207 | Ï | 236 | ì |
34 | " | 63 | ? | 92 | \ | 121 | y | 150 | | 179 | ³ | 208 | Ð | 237 | í |
35 | # | 64 | @ | 93 | ] | 122 | z | 151 | | 180 | ´ | 209 | Ñ | 238 | î |
36 | $ | 65 | A | 94 | ^ | 123 | { | 152 | | 181 | µ | 210 | Ò | 239 | ï |
37 | % | 66 | B | 95 | _ | 124 | | | 153 | | 182 | ¶ | 211 | Ó | 240 | ð |
38 | & | 67 | C | 96 | ` | 125 | } | 154 | | 183 | · | 212 | Ô | 241 | ñ |
39 | ' | 68 | D | 97 | a | 126 | ~ | 155 | | 184 | ¸ | 213 | Õ | 242 | ò |
40 | ( | 69 | E | 98 | b | 127 | | 156 | | 185 | ¹ | 214 | Ö | 243 | ó |
41 | ) | 70 | F | 99 | c | 128 | | 157 | | 186 | º | 215 | × | 244 | ô |
42 | * | 71 | G | 100 | d | 129 | | 158 | | 187 | » | 216 | Ø | 245 | õ |
43 | + | 72 | H | 101 | e | 130 | | 159 | | 188 | ¼ | 217 | Ù | 246 | ö |
44 | , | 73 | I | 102 | f | 131 | | 160 | 189 | ½ | 218 | Ú | 247 | ÷ | |
45 | - | 74 | J | 103 | g | 132 | | 161 | ¡ | 190 | ¾ | 219 | Û | 248 | ø |
46 | . | 75 | K | 104 | h | 133 | 162 | ¢ | 191 | ¿ | 220 | Ü | 249 | ù | |
47 | / | 76 | L | 105 | i | 134 | | 163 | £ | 192 | À | 221 | Ý | 250 | ú |
48 | 0 | 77 | M | 106 | j | 135 | | 164 | ¤ | 193 | Á | 222 | Þ | 251 | û |
49 | 1 | 78 | N | 107 | k | 136 | | 165 | ¥ | 194 | Â | 223 | ß | 252 | ü |
50 | 2 | 79 | O | 108 | l | 137 | | 166 | ¦ | 195 | Ã | 224 | à | 253 | ý |
51 | 3 | 80 | P | 109 | m | 138 | | 167 | § | 196 | Ä | 225 | á | 254 | þ |
52 | 4 | 81 | Q | 110 | n | 139 | | 168 | ¨ | 197 | Å | 226 | â | 255 | ÿ |
53 | 5 | 82 | R | 111 | o | 140 | | 169 | © | 198 | Æ | 227 | ã | ||
54 | 6 | 83 | S | 112 | p | 141 | | 170 | ª | 199 | Ç | 228 | ä | ||
55 | 7 | 84 | T | 113 | q | 142 | | 171 | « | 200 | È | 229 | å | ||
56 | 8 | 85 | U | 114 | r | 143 | | 172 | ¬ | 201 | É | 230 | æ | ||
57 | 9 | 86 | V | 115 | s | 144 | | 173 | | 202 | Ê | 231 | ç |
Useful Constants
Chr(8) | Backspace character |
Chr(9) | Tab character (Constants.vbTab) |
Chr(10) | Linefeed character |
Chr(11) | Manual line break (Shift + Enter) |
Chr(12) | Manual page break |
Chr(13) + Chr(10) | Carriage return - linefeed combination |
Chr(13) + Chr(10) | New line character |
Chr(14) | Column break |
Chr(30) | Non-breaking hyphen |
Chr(31) | Optional hyphen |
Chr(32) | Space |
Chr(34) | Quotation Mark |
Chr(160) | Non-breaking space |
These need to be checked and the FONt confirmed !!!
Computers use numerical values for all data
Text is represented by assigning a numerical value to each letter, digit and symbol.
All computers need to be able to use the same codes
The first widely adopted standard was the ASCII character set which uses the values 0 to 127 to represent the letters, numericals and commonly used punctuation marks and characters.
For example lowercase letters a-z are represented by the values 97-122
The ANSI (American National Standards Institute) code expanded on this by adding (128-255
ANSI is also known as extended ASCII.
ASCII codes 0-31 represent non printing characters.
It was soon realised that the 255 ASCII values were not sufficient for the number of characters that computers needed to work with.
As a result the Unicode standard was created using values 0-65,535
Only 39,000 of these codes are currently assigned
VBA provides functions to work with both ASCII and Unicode
Windows does support Unicode but it will depend on your regional settings.
ASC - returns the ASCII code for a character
ASCW - returns the Unicode for a character
ASCB - returns the first single byte of the Unicode for a character
© 2023 Better Solutions Limited. All Rights Reserved. © 2023 Better Solutions Limited TopPrevNext