Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 16-04-2009
Member
 
Join Date: Jan 2009
Posts: 74
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.
Reply With Quote
  #2  
Old 16-04-2009
Member
 
Join Date: May 2008
Posts: 2,383
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.
Reply With Quote
  #3  
Old 16-04-2009
Member
 
Join Date: Jan 2009
Posts: 74
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
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to Call a variable subroutine or function"
Thread Thread Starter Forum Replies Last Post
Call a function depending on the variable name Captain Carrot Software Development 5 23-03-2010 09:27 AM
How to pass PHP variable value to jquery function? Kasper Software Development 5 03-03-2010 06:41 PM
Accessing a variable outside a function without arg BoanHed Software Development 3 04-12-2009 01:35 PM
Function with a variable number of arguments Chrisch Software Development 3 20-11-2009 02:03 PM
What is the difference between a function and a subroutine? Pooja Software Development 5 28-02-2009 06:43 PM


All times are GMT +5.5. The time now is 08:28 PM.