Results 1 to 4 of 4

Thread: Text box math

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2001
    Location
    Hoschton Ga.
    Posts
    24
    I left this thread in the general section also but im not getting much help there.

    Here is the code im having a problem with

    Text23.text = Val(text10.text) * 50
    Text12.text = Val(text1.text) / Val(Text23.text)

    On the second line I recieve a overflow error could this be happening because text1.text = 0
    I have tried the clng instead of val also.

    Thanks to anyone that can help

  2. #2
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    You should only get an overflow error if the value of text10 is really small, or 0. (actually if it's 0 you'll get a division by 0 error. try it with numbers between 1 and 10. you shouldn't have any problems.
    If it wasn't for this sentence I wouldn't have a signature at all.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2001
    Location
    Hoschton Ga.
    Posts
    24
    Actually the number in text10 is from 1-480
    and Text1 is 1-24000 I have done a work around

    IF Val(Text10.text) > 0 Then Text23.text Val(text10.text) * 50
    IF Val(Text1.text) > 0 Then Text12.text = Val(text1.text) / Val


    This seems to work but there may still be a problem Im
    not getting an overflow error now

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Mar 2001
    Location
    Hoschton Ga.
    Posts
    24
    Actually the number in text10 is from 1-480
    and Text1 is 1-24000 I have done a work around

    IF Val(Text10.text) > 0 Then Text23.text Val(text10.text) * 50
    IF Val(Text1.text) > 0 Then Text12.text = Val(text1.text) / Val


    This seems to work but there may still be a problem Im
    not getting an overflow error now

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