thanks for the reply, however, I was in search of a way to call the
actual value of the variable
for example...
public sub DynamicCaller( ByVal strCtr as Integer)
Dim subName = "GetTable" & strCtr & "()"
'strCtr can be between 1 and 9
'here, need to call the function name of whatever is in subName
magicMethod(subName) 'doesn't necessarily have to be a method
name, should be anything that literally runs the value of the variable
' this magic method will either call GetTable1() or GetTable2() or
etc....
End Sub
billsahi...@yahoo.com wrote:
If subName = "GetTable1()" then
Call GetTable1()
elseif SubName = "GetTable2()" then
Call GetTable2()
Endif
But why bother with SubName? Just use strCtr instead of it.
Bill
On Mar 20, 1:54 pm, "H" <halukdot...@gmail.comwrote:
dim subName = "GetTable" & strCtr & "()"
I want to now call the GetTable1() sub or GetTable2() sub, depending
on
the value of strCtr.
How can I call the function whose name is in the variable subName?
thanks...