passing the name of a procedure via a variable

what is the easiest way to perform something similar to:

****
Dim var1 as String
Call var1
****

to excecute procedure Proc1?
LVL 7
the_bachelorAsked:
Who is Participating?
 
Bob LearnedConnect With a Mentor Commented:
Here's an example, using CallByName:

  Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    CallByName(Me, "Test", CallType.Method, New Object() {})

  End Sub

  Public Sub Test()
    MessageBox.Show("Test")
  End Sub

Bob
0
 
TheUnkindCommented:
try this one

dim proc2 as new proc1



0
All Courses

From novice to tech pro — start learning today.