RE: how to make a program/macro that toggles ascii/unicode characters

From: Marco Cimarosti (
Date: Tue May 30 2000 - 05:58:25 EDT

> I want to make a program in Visual Basic, [...]
> I've made a similar program before, [...].
> This is simply done by the routine
> if asc(sign) = nnn then sign = chr(yyy), [...]
> But this doesn't seem to work with unicode and values outside > 255.
> Can it be done - and how?

Newer version of VB have both Unicode and local (code-page oriented) versions of string-handling functions.
Unicode functions have a "W" suffix (for "wide characters"): AscW(), ChrW(), etc.
Code-page oriented functions have a "B" suffix (for "byte characters"): AscB(), ChrB(), etc.

A function with no suffix like Chr() is now just an alias, that maps to either ChrW() or ChrB(), depending on the operating system the program is running on. So these generic functions are not good for you, because you need the same result on the many Windows platforms that you need to support.

Hope this helps.
FREE Personalized Email at
Sign up at

This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:21:03 EDT