有没有办法在VBA中知道没有被使用的变量? [英] Is there a way in VBA to know about variables that aren't being used?
本文介绍了有没有办法在VBA中知道没有被使用的变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在VBA中有一个工具,方法或设置来警告已经 Dim
'med的变量,但是没有被使用?
Is there a tool, method or setting in VBA to warn about variables that have been Dim
'med, but aren't being used?
推荐答案
MZ-Tools 将搜索您的代码,并告诉您什么是没有被使用。 VBA的版本可以在这里找到。
MZ-Tools will search through your code and tell you what is not being used. The version for VBA can be found here.
MZ-Tools中执行您所要求的具体功能是查看源代码:
The specific feature in MZ-Tools that performs what you asking about is Review Source Code:
查看源代码功能允许
将源代码检查为
检测一些未使用的声明
(常量,变量,参数,
程序等)。
The Review Source Code feature allows you to review the source code to detect some unused declarations (constants, variables, parameters, procedures, etc.).
这篇关于有没有办法在VBA中知道没有被使用的变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文