excel vba代码大全_在Excel VBA代码中获取详细信息

excel vba代码大全

在Excel VBA代码中获取详细信息 (Get Details in Excel VBA Code)

Did you ever get an Excel file from someone else, and try to sort out their Excel VBA code? Or, even worse, open an Excel file that you wrote long ago, and try to remember what all those variables mean?

您是否曾经从其他人那里获得过Excel文件,并试图整理出他们的Excel VBA代码? 或者,更糟糕的是,打开您很久以前编写的Excel文件,并尝试记住所有这些变量的含义?

I spend lots of time staring at Excel code, but apparently I don't use the right-click menu too often, because I hadn't noticed a couple of handy commands until recently.

我花了很多时间盯着Excel代码,但是显然我不经常使用右键菜单,因为直到最近我才注意到几个便捷的命令。

These commands can help you decipher that mysterious code, and unravel the complicated sections.

这些命令可以帮助您解密该神秘代码,并解开复杂的部分。

Excel VBA快速信息 (Excel VBA Quick Info)

The first handy command is Quick Info. I have Auto Quick Info turned on in the VBE Editor options, and it helps me remember the syntax as I type the code.

第一个方便的命令是快速信息。 我在VBE编辑器选项中启用了“自动快速信息”,这有助于我在键入代码时记住语法。

excelvbainfo00

What I didn't realize was that you can right-click on a variable, function, statement, method, or procedure in the code, and click Quick Info.

我没有意识到的是,您可以右键单击代码中的变量,函数,语句,方法或过程,然后单击“快速信息”。

excelvbainfo01

A tooltip appears, with details on the selected item.

出现工具提示,其中包含有关所选项目的详细信息。

excelvbainfo02

Excel VBA定义 (Excel VBA Definition)

The other right-click command that I finally discovered is the Definition command.

我最后发现的另一个右键单击命令是“定义”命令。

excelvbainfo03

Click the Definition command, and it takes you to the selected variable's definition. Finding the definition is easy in most procedures, but in a long procedure, with a long list of variables, the Definition command really makes the job easier.

单击“定义”命令,它将带您到所选变量的定义。 在大多数过程中,找到定义都很容易,但是在长过程中,由于变量列表很长,Define命令确实使这项工作变得容易。

It's especially helpful if the variable is defined on a different code module!

如果变量是在其他代码模块上定义的,则特别有用!

翻译自: https://contexturesblog.com/archives/2010/10/25/get-details-in-excel-vba-code/

excel vba代码大全

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值