Thread: Overflow Error
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
LeeL LeeL is offline
external usenet poster
 
Posts: 16
Default Overflow Error

Any ideas, please?

The sub below stops with Run-time error '6':
Overflow

Sub ColourIt()

NumOfRows = Cells(Rows.Count, 1).End(xlUp).Row

Dim OnHand As Integer
Dim ATS As Integer

For CurrentRow = 2 To NumOfRows

OnHand = ActiveSheet.Cells(CurrentRow, 6)
ATS = ActiveSheet.Cells(CurrentRow, 7)

If OnHand + ATS1 = 0 Then
Cells(CurrentRow, 2).Interior.ColorIndex = 22
End If

Next
End Sub
--
Thanks & Best Regards