VAL( string$ )

Returns the numerical value of the string$. If string$ is an invalid number the function will return zero.

This function will recognise the &H prefix for a hexadecimal number, &O for octal and &B for binary.