PDA

Click to See Complete Forum and Search --> : Function references in VB?


Gaurav
Jan 12th, 2000, 12:34 PM
Hi,
I was wondering if any one knows how to pass a function reference to a VB routine?

I have a class that exposes a public sub, for which one of my parameters must be the name of a function that this subroutine can execute.

First, can this be done in vb? if yes HOW? :)

Thanks
Gaurav

------------------
Gaurav Mahindra
gmahindra@extentia.com

Clunietp
Jan 12th, 2000, 01:24 PM
Check this out -- uses CallByName
http://www.vb-world.net/ubb/Forum3/HTML/002581.html

Crazy D
Jan 12th, 2000, 04:58 PM
If I get you right, you want one of your functions in your class to call a function? Why not raise an event? That's much easier :-)

Gaurav
Jan 12th, 2000, 05:12 PM
Well, thanks guys for the quickie replies :)
And the winne is "Clunietp" Thanks mate, the perfect solution. This new to VB 6.0? Hadn't heard of it before. Anyways thanks.

Crazy D, I don't want to raise an event. I'm designing a splitter control so i want to be able to pass in the function name corresponding to the re size logic. Using CallByName covers this perfectly. and leaves me event free :) Thanks for your reply any way.

Cheers,
Gaurav



------------------
Gaurav Mahindra
gmahindra@extentia.com