From: Raj on
How to convert hex data to ASCII and the vice versa?

Ex: if I give ABC I will get 414243

Thank you

Regards
Raj
From: Nobody on
Debug.Print Val("&H" & "ABC")
Debug.Print Hex(414243)


From: Eduardo on
Raj escribió:

> How to convert hex data to ASCII and the vice versa?

> Ex: if I give ABC I will get 414243

How 414243 relates to ABC?

It is not a conversion to ASCII nor to decimal (Dec).

ASCII and decimal are different things.

ABC in ASCII is 656667 (OK, it's just two digits of the ASCII codes)
Debug.Print CStr(Asc("A")) & CStr(Asc("B")) & CStr(Asc("C"))

ABC in decimal is 2748
Debug.Print &HABC
From: Raj on
I am sorry it is workin out!

"Nobody" wrote:

> Debug.Print Val("&H" & "ABC")
> Debug.Print Hex(414243)
>
>
>
From: James Hahn on
Hex(Asc("A")) & Hex(Asc("B")) & Hex(Asc("C"))


"Eduardo" <mm(a)mm.com> wrote in message news:h8sfh6$sd3$1(a)aioe.org...
> Raj escribió:
>
>> How to convert hex data to ASCII and the vice versa?
>
>> Ex: if I give ABC I will get 414243
>
> How 414243 relates to ABC?
>
> It is not a conversion to ASCII nor to decimal (Dec).
>
> ASCII and decimal are different things.
>
> ABC in ASCII is 656667 (OK, it's just two digits of the ASCII codes)
> Debug.Print CStr(Asc("A")) & CStr(Asc("B")) & CStr(Asc("C"))
>
> ABC in decimal is 2748
> Debug.Print &HABC