I know how to convert intergers to Hexa but, how do I convert hexa to integers?
Thanx in advance
Printable View
I know how to convert intergers to Hexa but, how do I convert hexa to integers?
Thanx in advance
Hope I remembered this right,Code:'add into a module
Public Function IntHex (HexValue As String) As Integer
IntHex = Val("&H" & HexValue)
End Function
Actually, I think you would be better off using CLng and converting Hex to Long Integer, as follows:
If you use the Function previously posted, Val("&HFFFF&") results in -1.
CLng("&HFFFF&") results in 65535.
Val("&HFF00&") results in -256
CLng("&HFF00&") results in 65280
Cheers
Adrian