TechArena Community

TechArena Community (http://forums.techarena.in/)
-   Software Development (http://forums.techarena.in/software-development/)
-   -   How to Call a variable subroutine or function (http://forums.techarena.in/software-development/1162477.htm)

Sayam 16-04-2009 06:03 PM

How to Call a variable subroutine or function
 
Hi friends,

I want to store the name of a function or subroutine in a string and then i will call that subroutine or function based on the name that is stored in that string variable.I have try to do it but it's not working can anyone help me out with this issue.

opaper 16-04-2009 07:55 PM

Re: How to Call a variable subroutine or function
 
Sure i will help you out with this issue before that may i know which application are you making your Code and if possible did you wrote any code then please provide it.

Sayam 16-04-2009 09:33 PM

Re: How to Call a variable subroutine or function
 
I was try to do this in VBA and following are the code which i am trying out but it's not working

Code:

sub dummy(msgnumber as integer)
  msgbox msgnumber
end sub

sub main()
  dim SubName as String
  SubName = "dummy(1234)"
  Call SubName
end sub



All times are GMT +5.5. The time now is 10:01 PM.