Results 1 to 3 of 3

Thread: val() function in VBscript.-- Variable is undefined!!

  1. #1

    Thread Starter
    Lively Member Cerebrate's Avatar
    Join Date
    May 2000
    Posts
    82

    Red face

    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

  2. #2
    Addicted Member
    Join Date
    May 2000
    Posts
    142
    why not use

    Code:
    CLng(anynumber)
    to convert to number?

  3. #3
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    Val() is not suported in VBScript
    take a lok at http://forums.vb-world.net/showthrea...threadid=18175
    Mark
    -------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width