LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Procedure loop limitation?

Thanks for your help Guys - got it working


"PC" <paulm DOT c at iol DOT ie wrote in message
...
Hi,

I have created a macro (vba procedure) which runs when a command button is
pressed on a spreadsheet. The procedure performs a certain task then calls

a
second procedure which runs in a continuous loop until it reaches the end

of
a series of active work sheets. At this point the second procedure exits

and
returns control to the first procedure.

An example

Sub Procedure_Name1()
Do something
Call Procedure_Name2
End Sub

Sub Procedure_Name2()
On Error Goto Err_Procedure_Name2
Do some other stuff 'Perform an action on the active sheet
then move to next sheet
Call Procedure_Name2 'Loop until error
Err_Procedure_Name2:
Exit Sub
End Sub


This process works perfect but for some reason it stops after looping 23
times i.e. 23 sheets are updated when the loop stops with no error

message.
Is there some restriction in VBA that prevents a procedure from looping

more
than 23 times.

Any help would be appreciated.

..pc






 
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
Find loop doesn't loop JSnow Excel Discussion (Misc queries) 2 June 24th 09 08:28 PM
Nested If Loop Limitation for Excel 2003 raj74 Excel Discussion (Misc queries) 9 March 1st 09 06:14 PM
Stop a Procedure from another procedure Ayo Excel Discussion (Misc queries) 1 October 30th 08 01:42 AM
HELP!!!! Can't stop a loop (NOT an infinite loop) TBA[_2_] Excel Programming 3 December 14th 03 03:33 PM


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

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

About Us

"It's about Microsoft Excel"