tags:

views:

29

answers:

1

How can I get the unicode value of a char?

For example, I know that I can do this with ascii:

i = Asc("a") // i == 97 (correct)

What if I have a unicode char though?

i = Asc("•") // i == 149 (incorrect... should return 8226)

Obviously the second example doesn't work since that character is not in the Ascii set. Is there an equivalent function that I can use which will return 8226 instead of the incorrect result 149?

I'm doing this in Outlook 2003, if that makes any difference.

+6  A: 

What about AscW ?

RC
Yup, that's the function I was looking for, thanks!
Senseful
+1 but you've linked to the Vb.net docs. Here's VB6 instead (VBA would be even better) http://msdn.microsoft.com/en-us/library/aa262678(VS.60).aspx
MarkJ
@MarkJ, thanks for the VB6 link, answer corrected.
RC