Simply was to repeat a macro N times
Is there is sample way to execute a macro N number of
times without hitting a control key repeatitively? Thanks |
Simply was to repeat a macro N times
Joe, is this what you have in mind?
Sub test_loop() Dim i As Integer i = 1 Do Until i = 12 'put code here if A1 has 1 then this will run till A1 = 12 Sheet1.[A1] = Sheet1.[A1].Value + 1 i = i + 1 Loop End Sub -- Paul B Always backup your data before trying something new Using Excel 2000 & 97 Please post any response to the newsgroups so others can benefit from it ** remove news from my email address to reply by email ** "Joe Wooldridge" wrote in message ... Is there is sample way to execute a macro N number of times without hitting a control key repeatitively? Thanks |
Simply was to repeat a macro N times
Write a "helper" procedu
Sub RepeatMacro() For i = 1 to 10 TheRealMacro Next i End Sub On Thu, 24 Jul 2003 19:19:03 -0700, "Joe Wooldridge" wrote: Is there is sample way to execute a macro N number of times without hitting a control key repeatitively? Thanks |
All times are GMT +1. The time now is 09:51 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com