Thursday, September 23, 2010

Dealing with ASCII Characters

Normally ASCII character is used when some string we want to use but prohibited in VBA such as " , ) and etc.

Eg. for below command.
If sPin(1) = "key=" & Chr$(34) & "25" & Chr$(34) Then

ASCII Codes 0 - 127 0 &127; 32 [space] 64 @ 96 ` 1 &127; 33 ! 65 A 97 a 2 &127; 34 " 66 B 98 b 3 &127; 35 # 67 C 99 c 4 &127; 36 $ 68 D 100 d 5 &127; 37 % 69 E 101 e 6 &127; 38 & 70 F 102 f 7 &127; 39 ' 71 G 103 g 8 * * 40 ( 72 H 104 h 9 * * 41 ) 73 I 105 i 10 * * 42 * 74 J 106 j 11 &127; 43 + 75 K 107 k 12 &127; 44 , 76 L 108 l 13 * * 45 - 77 M 109 m 14 &127; 46 . 78 N 110 n 15 &127; 47 / 79 O 111 o 16 &127; 48 0 80 P 112 p 17 &127; 49 1 81 Q 113 q 18 &127; 50 2 82 R 114 r 19 &127; 51 3 83 S 115 s 20 &127; 52 4 84 T 116 t 21 &127; 53 5 85 U 117 u 22 &127; 54 6 86 V 118 v 23 &127; 55 7 87 W 119 w 24 &127; 56 8 88 X 120 x 25 &127; 57 9 89 Y 121 y 26 &127; 58 : 90 Z 122 z 27 &127; 59 ; 91 [ 123 { 28 &127; 60 < 92 \ 124 | 29 &127; 61 = 93 ] 125 } 30 &127; 62 > 94 ^ 126 ~ 31 &127; 63 ? 95 _ 127 &127;
&127; These characters aren't supported by Microsoft Windows. * * Values 8, 9, 10, and 13 convert to backspace, tab, linefeed, and carriage return characters, respectively. They have no graphical representation but, depending on the application, can affect the visual display of text.

No comments:

Post a Comment

Please add if your have better information.