How is it possible to get the hex or decimal value of one charater from a string?
For example: I want the decimal value of the "a" from the "hallo" string. Does anybody know how to do that? Code would be helpful.
Thanks and redards
Sascha
Printable View
How is it possible to get the hex or decimal value of one charater from a string?
For example: I want the decimal value of the "a" from the "hallo" string. Does anybody know how to do that? Code would be helpful.
Thanks and redards
Sascha
MsgBox Hex$(Asc("a"))
Hi Lothar,
sorry if I didn't really said what I want. I have a string e.g. with 6 characters, but I don't know the contents. Now I want the decimal value of e.g. the third character of this specific string.
Example: dim a As string
a = ??(?)???
Decimal value of the third character?
How to do that?
Tanks and regars
Sascha
to get a specific char from a string use the Mid function.
To convert it to a decimal value use Asc.
e.g. to convert the third char in string x
a = asc(mid(x,3,1))