View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Suzy[_2_] Suzy[_2_] is offline
external usenet poster
 
Posts: 1
Default Run-time error '6' overflow

I keep getting that error when I use this code
Sub test()
Dim a As Integer
For a = 50000 To 50100
Range("J1, K28").Value = a
ActiveSheet.PrintOut
Next a
End Sub

but it has always worked perfectly when I used this
Sub test()
Dim a As Integer
For a = 20000 To 20100
Range("J1, K28").Value = a
ActiveSheet.PrintOut
Next a
End Sub

But I can't figure out which part is causing the problem