Calling function by a variable name
Posted on 2010-08-15
I am trying to call a function by its variable name. I have tried the evaluate and application.run method but none of them work. In the code below, I have a Select Case function which calls the CommandCode to run. command is a function name and argument is the value passed into the function. Can someone please give me some advise? Thanks.
Function CommandCode(progctr As Long)
Dim command As String
Dim argument As String
command = Worksheets("GUI").Cells(progctr + 1, 2).Value
argument = Worksheets("GUI").Cells(progctr + 1, 3).Value
Private Sub optionStatus(ByVal progctr As Long)
Select Case progctr
Debug.Print "No match"