Calling a function based on the contents of a string
Hi all, is it possible to call a function based on the name of a string?
What I want to do is treat the contents of "TextVariable" as a function name and then call it...
i.e. something similar to this:
VB Code:
Sub Command1_Click()
Msgbox "Button pressed"
End Sub
Sub Command2_Click()
Dim TextVariable as String
TextVariable = GetFunctionNameFromDatabase()
'i.e. TextVariable = "Command1_Click()"
Call ContentsOf(TextVariable)
End Sub
cheers
- Mike.