Task

Write a procedure which accepts as arguments another procedure and a positive integer.

The latter procedure is executed a number of times equal to the accepted integer.




Private Sub Repeat(rid As String, n As Integer)
    For i = 1 To n
        Application.Run rid
    Next i
End Sub
 
Private Sub Hello()
    Debug.Print "Hello"
End Sub
 
Public Sub main()
    Repeat "Hello", 5
End Sub