Simply was to repeat a macro N times

  • Thread starter Thread starter Joe Wooldridge
  • Start date Start date
J

Joe Wooldridge

Is there is sample way to execute a macro N number of
times without hitting a control key repeatitively?

Thanks
 
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 **
 
Write a "helper" procedure:

Sub RepeatMacro()
For i = 1 to 10
TheRealMacro
Next i
End Sub
 
Back
Top