Looping a macro

S

Sony

I want my macro to call on itself at the end and keep performing the loop 20
times. How can I do that? Any help will be much appreciated.

TIA
Sony
 
D

Dallman Ross

Sony said:
I want my macro to call on itself at the end and keep performing
the loop 20 times. How can I do that? Any help will be much
appreciated.

You could, instead of calling the macro over and over,
loop through the actions 20 time:

Option Explicit
Sub total_recall()

For N = 1 To 20

'do something

Next 'N
End Sub


Or if you wanted, you could have "do something" turn out
to be to call a different macro.


Option Explicit
Sub total_recall()

For N = 1 To 20

Application.Run "macro_name"

Next 'N
End Sub

-dman-
 
Top