View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rob van Gelder[_4_] Rob van Gelder[_4_] is offline
external usenet poster
 
Posts: 1,236
Default Converting hex to ascii

It's confusing to say "hex byte" because that's mixing presentation with
storage. A Byte is a Byte and can be presented as decimal, hexadecimal,
binary, etc...

So, by Hex Byte I assume you actually mean hex string.

The first is Byte to Ascii, the secon is HexString to Ascii.

Sub test()
Dim byt As Byte, str As String

byt = &H41 'A
Debug.Print Chr(byt)

str = "41"
Debug.Print Chr("&H" & str)
End Sub


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Tom" wrote in message
om...
How do I convert a hex byte into an ascii character? I'll take an
excel formula or VB code. Either way would be fine. I could not find
an excel function to do this. I appreciate any help submitted. Thank
you.

tom