Sounds like you have Dim the loop counter as Integer rather than Long
Charles
__________________________________________________
The Excel Calculation Site
http://www.decisionmodels.com
"macroapa" wrote in message
...
Is there a max number of loops a For....Next can do?
I have set it to 40000 and it fails with an overflow error, but works
fine for 30000
Thanks.