parseInt function in VB6

Hi, I am looking for something similar to javascript's parseInt() function in Visual Basic. The code would translate the hexadecimal value of a string into a integer. the javascript code looks like this:

parseInt("0x" + String_Val)

The "Ox" added tells javascript to use hexadecimal format.

example: String_Val of 98 would return 152 String_Val of B3 would return 179

Comments

: Hi, I am looking for something similar to javascript's parseInt() function in Visual Basic. The code would translate the hexadecimal value of a string into a integer. the javascript code looks like this:: : parseInt("0x" + String_Val): : The "Ox" added tells javascript to use hexadecimal format.: : example: String_Val of 98 would return 152: String_Val of B3 would return 179: : Thanx for any help.:

I can't get it to return those values, but I thought you could convert Hex To an Integer using one or both of the Val or CInt functions. It could be that I was passing the Hexadecimal Value Wrong.

: : Hi, I am looking for something similar to javascript's parseInt() function in Visual Basic. The code would translate the hexadecimal value of a string into a integer. the javascript code looks like this:: : : : parseInt("0x" + String_Val): : : : The "Ox" added tells javascript to use hexadecimal format.: : : : example: String_Val of 98 would return 152: : String_Val of B3 would return 179: : : : Thanx for any help.: : : : I can't get it to return those values, but I thought you could convert Hex To an Integer using one or both of the Val or CInt functions. It could be that I was passing the Hexadecimal Value Wrong. :

: : : Hi, I am looking for something similar to javascript's parseInt() function in Visual Basic. The code would translate the hexadecimal value of a string into a integer. the javascript code looks like this:: : : : : : parseInt("0x" + String_Val): : : : : : The "Ox" added tells javascript to use hexadecimal format.: : : : : : example: String_Val of 98 would return 152: : : String_Val of B3 would return 179: : : : : : Thanx for any help.: : : : : : : I can't get it to return those values, but I thought you could convert Hex To an Integer using one or both of the Val or CInt functions. It could be that I was passing the Hexadecimal Value Wrong. : : : : Val("&H" & String_Val) : Val("&H" & "98") '152 : Val("&H" & "B3") '179 : : &O can be used for octal numbers...: Thanks, worked perfectly.