Hex function
Returns a string representing the hexadecimal numeric value.
Hex(number)
numberParameters are any valid expressions.
illustrate
ifnumberIf the parameter is not an integer, it is rounded to the closest integer before performing the operation.
If number is | Hex Return |
---|---|
Null | Null。 |
Empty | Zero (0). |
Other numbers | Hexadecimal characters up to eight digits. |
You can represent hexadecimal numbers by prefix &H before the number. For example, in hexadecimal counting method, &H10 represents the decimal number 16.
The following example usesHexThe function returns the hexadecimal number of the number:
Dim MyHexMyHex = Hex(5)
'
return5
。MyHex = Hex(10)
'
returnA
。MyHex = Hex(459)
'
return1CB
。