toWGS‖

4WpqB‖Hex Function

X79sx‖Returns a string that represents the hexadecimal value of a number.

te3Mp‖Syntax:


sniHV‖Hex (Number)

Ejckw‖Return value:

MvMTC‖String

RhxtR‖Parameters:

6B4BK‖ Number: Any numeric expression that you want to convert to a hexadecimal number.

SEjHR‖Error codes:

5 Invalid procedure call

XyWiz‖Example:


Sub ExampleHex
WsqJB‖' uses BasicFormulas in LibreOfficeDev Calc
Dim a2, b2, c2 As String
    a2 = "&H3E8"
    b2 = Hex2Lng(a2)
    MsgBox b2
    c2 = Lng2Hex(b2)
    MsgBox c2
End Sub
 
Function Hex2Lng(sHex As String) As Long
PrCEr‖' Returns a 32-bit signed integer number from an 8-digit hexadecimal value.
    Hex2Lng = clng( sHex )
End Function
 
Function Lng2Hex(iLong As Long) As String
fcv3u‖' Calculates the 8-digit hexadecimal value out of a 32-bit signed integer number.
    Lng2Hex = "&H" & Hex( iLong )
End Function