


Hex, Hex$
Purpose
Returns a string that represents the hexadecimal value of a decimal argument.
Arguments
Hex[$]( number )
Notes
Hex returns a Variant; Hex$ returns a String. The argument number can be any numeric expression. It is rounded to the nearest whole number
before being evaluated. An error occurs if number is a null.
If the argument is an Integer or a Variant of VarType 2 (Interger), up to four
hexadecimal characters are returned; if the argument is a Long, or a Variant
of VarType 3 (Long), up to eight hexadecimal characters are returned. You can
represent hexadecimal numbers directly by preceding numbers in the proper range
with
&H. For example, &H10 is the decimal 16 in hexadecimal notation.
Example
This example returns the hexadecimal representation of the numeric variable
Num.
H = Hex(Num)