HEXVAL()
Action
Convert string representing a hexadecimal number into a numeric variable.

Syntax
var = HEXVAL( x )

Remarks

var The numeric variable that must be assigned.
X The hexadecimal string that must be converted.
var : Byte, Integer, Word, Long.
x : String.

The string that must be converted must have a length of 2 bytes ,4 bytes of 8 bytes, for bytes, integers/words and longs respectively.

Difference with QB
In QB you can use the VAL() function to convert hexadecimal strings.
But since that would require an extra test for the leading &H signs, that are required in QB, a separate function was designed.

See also
HEX , VAL , STR

Example
Dim a as Integer, s as string * 15
s = "000A"
a = Hexval(s) : Print a
End