都是自己的函数吗?
那你给son加一个参数,传入是谁调用的不就行了
Function father()
son 0, 0, 0, "father"
End Function
Function mother()
son 0, 0, 0, "mother"
End Function
Function son(其他参数1, 其他参数2, 其他参数n, 谁调用的 As String)
Dim 谁 As String
If 谁调用的 = "father" Then 谁 = "爹"
If 谁调用的 = "mother" Then 谁 = "娘"
MsgBox 谁 & "叫我呐", , "做儿子的还能分不清爹娘嘛"
End Function
'测试代码
Private Sub Command1_Click()
father
End Sub
Private Sub Command2_Click()
mother
End Sub
以上就是关于vb中如何获得调用函数名全部的内容,包括:vb中如何获得调用函数名、、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)