Results 1 to 2 of 2

Thread: Overflow at 6

  1. #1

    Thread Starter
    Addicted Member Dementia Freaks's Avatar
    Join Date
    Jun 2001
    Location
    Canada
    Posts
    132

    Angry Overflow at 6

    Private Sub Command1_Click()
    Dim i As Integer
    Dim s As String
    For i = Val(Text1.Text) To Val(Text2.Text)
    s = s & i & vbCrLf
    Next i
    Text3.Text = s
    End Sub


    causes an overflow at 6 numbers. my app will need to run 11 max. it will be generating numbers between a set of 11:

    ex:

    12345670000
    12345679999
    Gray FOX: "Only a fool, trusts his life to a Weapon!"

    Bart Simpson: "Bart no like! Baaad medicene!"

    www.sling.to/dementia-freaks <<<---Goto my site!

    http://pub80.ezboard.com/bdementiafreaksforum <<<---Goto my forum!

    Thats it!

  2. #2
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    VB Code:
    1. Dim i As Double
    2. Dim s As String
    3. For i = CDbl(Text1.Text) To CDbl(Text2.Text)
    4.     s = s & i & vbCrLf
    5. Next i
    6. Text3.Text = s
    -= a peet post =-

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