Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc
|
|||
|
|||
End loop macro with count
Help! I want to limit the number of times my loop macro iterates to,
for example, 20 times. I have attempted to use a "count" function but I don't have a working example, I can't locate one, and my attempt doesn't work. Can someone please provide a simple way of doing this. The routine has apprximately 15 sub routines. A count limit that applies to a specific sub routine will be perfect or one that applies to the whole routine will be near enough to. Thanks in advance. |
#2
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc
|
|||
|
|||
End loop macro with count
Jason,
Try using a For loop. E.g., Dim N As Long For N = 1 To 20 ' your code here Next N -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Jason C." wrote in message om... Help! I want to limit the number of times my loop macro iterates to, for example, 20 times. I have attempted to use a "count" function but I don't have a working example, I can't locate one, and my attempt doesn't work. Can someone please provide a simple way of doing this. The routine has apprximately 15 sub routines. A count limit that applies to a specific sub routine will be perfect or one that applies to the whole routine will be near enough to. Thanks in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help with using a Macro Loop | Excel Discussion (Misc queries) | |||
Loop to run macro each row | Excel Discussion (Misc queries) | |||
macro loop | Excel Discussion (Misc queries) | |||
count rownumbers in loop | Excel Discussion (Misc queries) | |||
loop count | Excel Discussion (Misc queries) |