Hex function
Hex( num )
Returns the hexadecimal value of a decimal parameter. Hex returns a string.
The parameter num can be any valid number. It is rounded to nearest whole number before evaluation.
Example
Sub Main()
   Dim Msg As String, x%
   x% = 10
   Msg =Str( x%) &  " decimal is "
   Msg = Msg & Hex(x%) & " in hex "
   MsgBox Msg
End Sub