如何知道子程序调用的过程?在Excel VBA中 [英] How to know the procedure by which subroutine called? in excel vba

查看:73
本文介绍了如何知道子程序调用的过程?在Excel VBA中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有时我的子例程出错.该子例程被许多过程调用.因此,我尝试查找呼叫者程序以进行分步.

I sometimes has error on subroutine.The subroutine is called by many procedure. So, I try to find caller procedure for step over.

顺便说一句,用户定义的函数可以知道调用方.
很简单.

By the way, user-defined function can know the caller.
It is simply.

MsgBox Application.Caller

我们可以看到对话框和呼叫方单元地址.

We can see dialog and caller cell address.

我想知道子程序的调用程序.

I want to know caller procedure of subroutine.

推荐答案

您可以使用调用堆栈对话框

例如,在下面的图像中,proc3被proc2调用,而proc2则显示在调用堆栈对话框中.

For example in the below image proc3 was called by proc2 which is displayed in call stack dialog box.

这篇关于如何知道子程序调用的过程?在Excel VBA中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆