Is there an n such that Chr(n) in Word VBA gives the greater than or equal to sign? Like Chr(150) is an m-dash (subtraction sign)?
Asked
Active
Viewed 1,762 times
0
-
Apparently `>=` is not in the ASCII table. See [this question](http://stackoverflow.com/questions/12140003/ascii-code-for-less-than-or-equal-to) – tospig Feb 09 '15 at 21:42
-
@tospig ASCII is not relevant to VBA. `Chr()` uses the current ANSI codepage, which would be Windows-1252 or the like. `ChrW()` uses Unicode/UTF-16 code-units. – Tom Blodget Feb 10 '15 at 03:36
1 Answers
0
The character value code for greater than or equal is reached with ChrW, which accesses the Unicode character set, and the value is ChrW(&H2265)

JRQ
- 545
- 4
- 17
-
I've just tried `ChrW(&H2265)` in Word and it gave me the equals (`=`) symbol only – tospig Feb 09 '15 at 22:05
-
How are you entering it? "Selection.TypeText (ChrW(&H2265))" inserts the correct character for me. – JRQ Feb 09 '15 at 22:12
-
-
-
I will do so. Sorry, new to this, but need guidance on how to do that. BUT I'm a little concerned. I used the exact identical program before posting this question here because it failed. – khargushoghli Feb 19 '15 at 01:04
-
@khargushoghli To mark a question as answered, click the big check mark next to the the answer. – JRQ Feb 28 '15 at 23:37