VB能否将函数作为参数传递呢?
本帖最后由 bcrun 于 2012-08-20 19:51:36 编辑 比如:
Private Sub Command1_Click()
Call mytest(mymsg)
End Sub
Function mytest(ob)
Do
Call ob
Loop
End Function
Sub mymsg()
MsgBox Now
End Sub
sub Parent(aaa as string) as boolean 'aaa传入另一函数或过程的名称。
CallByName Me, aaa, VbMethod me是aaa的窗体或对象(public声明的函数也是对象)
end sub
sub test1()
....
end sub
sub acall()
Parent "test1 "
end sub