View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Charles Williams Charles Williams is offline
external usenet poster
 
Posts: 968
Default For...Next loop limits

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.