Calling a SubProc with variable

You can run a routine by name using Application.Run
Code:
Sub TestRun()
   Dim i As Integer
   For i = 0 To 1
      Application.Run "Test" & i
   Next
End Sub

Sub Test0()
   Debug.Print "Hello Test0"
End Sub

Sub Test1()
   Debug.Print "Hello Test1"
End Sub
 

Users who are viewing this thread

Back
Top Bottom