Dim s as string = "FF" --16进制作为字符串
Dim value as Integer
value = val( "&h" & s ) --10进制整型
---
或用 System.Convert.ToInt32(string, integer)
Dim i As Integer
i = Convert.ToInt32("abcd", 16)
---
Dim s As String = "0A"
MsgBox(CInt("&H" & s))
MsgBox(Convert.ToInt32(s, 16))