目前运行功能? [英] Currently running function?

查看:84
本文介绍了目前运行功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




这是一个奇怪的!


有没有一种已知的方法来确定当前运行的Sub的名称或VBA代码中的函数?


我正在尝试构建一个通用的错误捕获函数,以避免编写数百个

Hi,

Here''s a weird one!

Is there a known way to determine the name of the currently running Sub or Function in VBA code?

I''m trying to build a generic error-trapping funtion, to avoid writing hundreds of

展开 | 选择 | Wrap | 行号

推荐答案

因为On Error语句只能在当前过程中分支,所以你可以说
As the On Error statement can only branch within the current procedure surely you can just say
展开 | 选择 | Wrap | 行号



因为On Error语句只能在当前过程中分支,你只能说
As the On Error statement can only branch within the current procedure surely you can just say
< span class =codeLinkonclick =Blur(this,this.parentNode.parentNode,getChildren(this),true);>展开 | 选择 | Wrap | 行号


Me.Module.Name将至少为您提供当前模块的名称。
Me.Module.Name will give you the name of the current module at least.


这篇关于目前运行功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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