Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Do...Loop Macro
I have a macro that I want to automatically repeat. How
and where to I plug in the Do Loop. Ex. I have text that I want to Cut and Paste on a line, that procedure needs to run about 10 times. How to I tell my macro to keep repeating itself? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Do...Loop Macro
Cass,
You would write the code something like Do Until (some_condition = False) ' your existing code here Loop The some_condition depends on your application. This should return a value of TRUE as long as you want to continue looping. When some_condition equals FALSE, the loop will terminate and execution will continue at the first line of code following the Loop statement. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Cass" wrote in message ... I have a macro that I want to automatically repeat. How and where to I plug in the Do Loop. Ex. I have text that I want to Cut and Paste on a line, that procedure needs to run about 10 times. How to I tell my macro to keep repeating itself? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Do...Loop Macro
Hi
have a look at For next in the VBA help -- Regards Frank Kabel Frankfurt, Germany "Cass" schrieb im Newsbeitrag ... I have a macro that I want to automatically repeat. How and where to I plug in the Do Loop. Ex. I have text that I want to Cut and Paste on a line, that procedure needs to run about 10 times. How to I tell my macro to keep repeating itself? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Loop to run macro each row | Excel Discussion (Misc queries) | |||
how can i loop a macro | Excel Discussion (Misc queries) | |||
Help With loop macro?? | Excel Programming | |||
Using for loop in a macro | Excel Programming | |||
Loop macro help. | Excel Programming |