Visual Basic 6.0 和 VBA 的区别 [英] Difference between Visual Basic 6.0 and VBA

查看:21
本文介绍了Visual Basic 6.0 和 VBA 的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这两者有什么区别.我一直认为 VBA 是 VB 的残缺"版本,但前几天有朋友问我时,我不知道实际的区别是什么.

What is the difference between the two. I always thought VBA is somewhat 'crippled' version of VB, but when a friend asked me the other day I had no idea what the actual differences are.

另外,例如,当您使用 Excel 时,是 VB 还是 VBA?

Also, when you use, for example, Excel, is that VB or VBA ?

推荐答案

对于几乎所有的编程目的,VBA 和 VB 6.0 是一回事.

For nearly all programming purposes, VBA and VB 6.0 are the same thing.

VBA 无法将您的程序编译成可执行的二进制文件.您将始终需要宿主(例如 Word 文件和 MS Word)来包含和执行您的项目.您也无法使用 VBA 创建 COM DLL.

VBA cannot compile your program into an executable binary. You'll always need the host (a Word file and MS Word, for example) to contain and execute your project. You'll also not be able to create COM DLLs with VBA.

除此之外,IDE 也有所不同——相比之下,VB 6.0 IDE 更强大.另一方面,您在 VBA 中紧密集成了宿主应用程序.应用程序全局对象(如ActiveDocument")和事件无需声明即可使用,因此特定于应用程序的编程非常简单.

Apart from that, there is a difference in the IDE - the VB 6.0 IDE is more powerful in comparison. On the other hand, you have tight integration of the host application in VBA. Application-global objects (like "ActiveDocument") and events are available without declaration, so application-specific programming is straight-forward.

不过,没有什么能阻止您启动 Word、加载 VBA IDE 并解决与 Word 无关的问题.我不确定 VB 6.0 是否可以(技术上)做任何事情,而 VBA 不能.不过,我正在寻找 MSDN 上的比较表.

Still, nothing keeps you from firing up Word, loading the VBA IDE and solving a problem that has no relation to Word whatsoever. I'm not sure if there is anything that VB 6.0 can do (technically), and VBA cannot. I'm looking for a comparison sheet on the MSDN though.

这篇关于Visual Basic 6.0 和 VBA 的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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