View Full Version : calling a user defined function dynamically with VB

09-14-2007, 08:49 PM
in php there is a function called call_user_func which you can use to dynamically execute a user create function along with any arguments you wish to pass to it

I am looking for a similar function in VB, I've google, msdn'd...etc.. with no luck
Is there such a function in VB and if so, what is it?

(PHP 4, PHP 5)

call_user_func Call a user function given by the first parameter

mixed call_user_func ( callback $function [, mixed $parameter [, mixed $...]] )

-thank u

09-15-2007, 12:04 AM
Does anyone know what i'm talking about?

09-18-2007, 05:19 PM
Now, I'm not saying this is will definitely work, but try looking up function pointers in VB.

There's a way that you can use "addressof" to dynamically pass in the name of a function. And you can pass parameters as well if needed.