VBA code is never stored as the plain text that you type in to the editor.
VBA代码绝不会作为您输入到编辑器的纯文本存储。
I am not aware of a single operation that a macro can do and VBA code can't.
我不知道一个单一的操作宏可以做和VBA代码不行。
In most cases it's probably faster to create a macro than it is to write VBA code.
在大多数情况下,它可能是更快地创建一个宏比编写VBA代码。
Demonstrates how to call code in a customization assembly from VBA code in the document.
演示如何从文档中的VBA代码中调用自定义项程序集中的代码。
Why would a query that returns 835 records in Access, return an empty recordset in VBA code?
为什么一个查询,它返回835条记录的访问,返回一个空记录集在VBA代码?。
Automation applications are often compiled to native code and therefore execute faster than VBA code.
自动化应用程序经常被编译为本机代码,因此执行速度比VBA代码快。
VBA code does not run when the document is in design mode, so you can work on the document and code without running the VBA code.
VBA代码在文档处于设计模式时不会运行,所以您可以处理文档和代码而不会运行 VBA 代码。
This includes other add-ins and document-level customizations running in the same application process, VBA code, and external automation code.
这包括在相同应用程序进程、VBA代码和外部自动化代码中运行的其他外接程序和文档级自定义项。
Keep in mind that hosted VBA code is compiled to p-code, not native code, and this incurs a slight performance penalty, although running in process enables optimized method calls to Office objects.
记住宿主的VBA代码被编译为p代码,而不是本机代码,这会导致性能略微有所下降,尽管在进程内运行能够优化对Office对象的方法调用。
Because this requires access to Microsoft Windows DLL files that are normally not directly available for VBA macros, you will need some additional code.
因为这需要访问MicrosoftWindowsDLL文件,但是这些文件尚不能从vba宏处直接获得,所以您需要添加额外的代码。
The second method Beth Massi describes is calling VSTO code from within VBA macros.
Beth Massi描述的第二种方法就是从VBA宏调用VSTO代码。
When you run the solution, event handlers in both VBA and the customization assembly pick up events that are raised in the document, and both sets of code run.
运行解决方案时,VBA和自定义项程序集中的事件处理程序都会选取文档中引发的事件,而且两组代码都会运行。
When you run the solution, event handlers in both VBA and the customization assembly pick up events that are raised in the document, and both sets of code run.
运行解决方案时,VBA和自定义项程序集中的事件处理程序都会选取文档中引发的事件,而且两组代码都会运行。
应用推荐