Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default For...Next loop limits

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default For...Next loop limits


To get a specific answer to your problem it pays to post a copy of your
code otherwise we can only guess at the cause

Charles Williams reply covers the most common cause of the type of
problem you discribed


--
mudraker

If my reply has assisted or failed to assist you I welcome your
Feedback.

www.thecodecage.com
------------------------------------------------------------------------
mudraker's Profile: http://www.thecodecage.com/forumz/member.php?userid=18
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=37455

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sum, ave with limits, help pls. Chris Excel Discussion (Misc queries) 6 November 3rd 08 12:53 PM
UDF limits David Thielen Excel Programming 2 April 7th 08 02:53 AM
Dynamic change of limits in for...next loop [email protected] Excel Programming 3 March 13th 07 05:53 PM
Row Limits jv Excel Worksheet Functions 1 March 17th 06 04:43 PM
Using UsedRange as limits in a For Each loop but for cells on another sheet ? tur13o Excel Programming 2 October 23rd 03 01:18 PM


All times are GMT +1. The time now is 04:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"