PDA

Click to See Complete Forum and Search --> : val() function in VBscript.-- Variable is undefined!!


Cerebrate
May 30th, 2000, 10:13 PM
I try to convert a string to number for calculation,
"XX=XX + val(a_string)"
but got this error:

" Variable is undefined: 'val' "

what shoud I do??
please help me!

Cerebrate

dvst8
May 30th, 2000, 10:24 PM
why not use


CLng(anynumber)


to convert to number?

Mark Sreeves
May 31st, 2000, 07:50 PM
Val() is not suported in VBScript
take a lok at http://forums.vb-world.net/showthread.php?threadid=18175