|
-
Nov 1st, 2000, 07:30 AM
#1
Thread Starter
Hyperactive Member
I know how to convert intergers to Hexa but, how do I convert hexa to integers?
Thanx in advance
-
Nov 1st, 2000, 07:37 AM
#2
Code:
'add into a module
Public Function IntHex (HexValue As String) As Integer
IntHex = Val("&H" & HexValue)
End Function
Hope I remembered this right,
-
Nov 1st, 2000, 08:47 AM
#3
Lively Member
HexToInt
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|