Converting hex values to string

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Solo
    New Member
    • Apr 2021
    • 1

    Converting hex values to string

    I have a byte array loaded with hex bytes read from a device on a com port. I need to convert the bytes into a string, but without doing any conversion to decimal, integer. etc. In other words, when I have a hex value of &H37, I need to convert it to a string of "37". Sounds simple, but has me puzzled so far.
  • cactusdata
    Recognized Expert New Member
    • Aug 2007
    • 223

    #2
    Hex will do that:

    Code:
    HexText = Hex(&H37)
    
    ? HexText
    37

    Comment

    Working...