Results 1 to 2 of 2

Thread: Runtime Error 6 : Overflow?

  1. #1
    Lively Member
    Join Date
    Jan 11
    Posts
    64

    Runtime Error 6 : Overflow?

    This code starts to find values and assigns them to Excel, but then gives a runtime error about overflow right after i
    click execute?

    Code:
    Dim cr As Integer
    Dim Time As Integer
    Dim Num As Integer
    
    
    Private Sub Start_Click()
        
        Time = 3120
        
        
        
        cr = 3
        
        Do
        
    For Num = 1 To 59
        
        If Cells(cr, 2) = Num Then
        
        Cells(Num, 9) = Cells(Num, 9) + 1
        
        cr = cr + 2
        
        Time = Time - 1
        
        Else
        
        Time = Time - 1
        
        cr = cr + 2
        
        End If
        
        Time = Time - 1
        
    Next Num
        
        Loop Until Time = 0
        
    
    
    End Sub

  2. #2
    Lively Member
    Join Date
    Jan 11
    Posts
    64

    Re: Runtime Error 6 : Overflow?

    Edit: Solved!

Posting Permissions

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