Data Type: Numeric or String
A valid numeric or string expression.
String representing the hexadecimal value of
Returns a string that represents the hexadecimal value of a number.
number contains a fractional
part, it’s rounded automatically to the nearest whole number
prior to processing. If the number ends in .5, it’s rounded to
the nearest even whole number.
number must evaluate to a
numeric expression that ranges from -2,147,483,648 to
2,147,483,647. If the argument is outside this range, runtime
error 6, “Overflow,” results.
The return value of
Hex is dependent upon the value and
Any other number
Up to eight hexadecimal characters
If the value of
number is known
beforehand and isn’t the result of an expression, you can represent
the number as a hexadecimal by simply affixing
number. Each of the following statements
assigns a hexadecimal value to a variable:
lngHexValue1 = &HFF ' Assigns 255
Hex$ function is not
available in VBScript.