Jun 3, 2003 #1 adi316 Programmer Sep 10, 2002 35 0 0 CA Hi. I have a string which contains a hex value. I want to somehow convert this value to an int. how is it possible? TIA
Hi. I have a string which contains a hex value. I want to somehow convert this value to an int. how is it possible? TIA
Jun 3, 2003 1 #2 jojo11 Programmer Feb 2, 2003 189 0 0 US You can use the Val function: Dim l As Long Dim sHex As String sHex = "A0" l = CLng("&H" & sHex) The leading "&H" tells Val that your value is in hexadecimal. Upvote 0 Downvote
You can use the Val function: Dim l As Long Dim sHex As String sHex = "A0" l = CLng("&H" & sHex) The leading "&H" tells Val that your value is in hexadecimal.