Function String Numerics Class

HexadecimalPairsToString

Converts a string in which each pair of characters represents an ASCII value into the string of characters with those ASCII values. Inverse of the StringToHexadecimalPairs function.

Signature (Visual Basic / VBA)

Public Function HexadecimalPairsToString( _
    ByVal vHex As Variant _
    ) As Variant

Code Example

    HexadecimalPairsToString("4142") = "AB"

Parameters

Parameter Description
vHex String in which each pair of characters represents the hexadecimal ASCII value of a character. Function returns Null if vHex is Null or cannot be fixed up to a String.

Notes & Version History

Note This function is useful for interpreting the hexadecimal-printable-representation of strings that contain non-printable characters. Strings are encoded with the StringToHexadecimalPairs function and decoded with this function.