View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Tom is offline
external usenet poster
 
Posts: 8
Default Converting hex to ascii

Thanks for your help Rob. I guess I had an older version of VB help
because I could not find any leads to the chr() function.

tom

"Rob van Gelder" wrote in message ...
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