Hi all,
is it possible to pass a function pointer to a VB Sub/Function?
Thanks!
Dave
Printable View
Hi all,
is it possible to pass a function pointer to a VB Sub/Function?
Thanks!
Dave
VB Code:
Private Sub Command1_Click() Call CallOthers(UCase(Text1.Text)) 'convert text1.text to upper case, and pass this letter to CallOthers function End Sub Sub A() MsgBox "A" End Sub Sub B() MsgBox "B" End Sub Sub C() MsgBox "C" End Sub Sub D() MsgBox "D" End Sub Sub E() MsgBox "E" End Sub Sub CallOthers(Func As String) CallByName Form1, Func, VbMethod 'Call the sub whoose name was given in Func argument. End Sub
Cool Thx!