本文介绍了哪个SUB称这个SUB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人知道如何在 access-vba .我正在尝试做类似的事情:

Does anyone out there know how to do a stack trace in access-vba. I'm trying to do something like:

Public Sub a()
    Call c
End Sub

Public Sub b()
    Call c
End Sub

Public Sub c()
    Debug.Print "Which sub has called me ?"
End Sub

我要在Sub c中执行的操作是显示是否已通过Sub aSub b调用了该调用,而没有传递任何参数.在 c 的问题中,我只是显示堆栈,但我有不知道在VBA中这是否可行-有什么想法吗?

What I want to do in Sub c is to show if that has been called by Sub a or Sub b without passing any arguments. In c I would simply show the stack but I have no idea if this is even possible in VBA - any thoughts ?

推荐答案

您可以在运行时通过菜单View-> Call Stack

You can access the call stack during runtime under the menu View -> Call Stack

或者,您可以在运行时使用键盘快捷键 + .

Alternatively you can use the keyboard shortcut + during runtime.

这篇关于哪个SUB称这个SUB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 04:58
查看更多