Excel VBA 和 VB.NET 一样吗

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11502788/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 13:32:54  来源:igfitidea点击:

Is Excel VBA the same as VB.NET

vb.netvba

提问by Coops

Is VB.NET the same language that is used in Excel 2003/2007 in the user editable code you can write in the backgrouund?

VB.NET 是否与 Excel 2003/2007 中您可以在后台编写的用户可编辑代码中使用的语言相同?

回答by tenfour

No, Excel 2003 and 2007 use Visual Basic for Applications, which is a variation of Visual Basic 6. This is an enormous change from VB.NET. See herefor more details about specific differences.

不,Excel 2003 和 2007 使用Visual Basic for Applications,它是 Visual Basic 6 的变体。这是VB.NET的巨大变化。有关特定差异的更多详细信息,请参见此处

回答by JohnB

No, the only similarity between VBA and VB.NET is the similar-looking syntax.

不,VBA 和 VB.NET 之间唯一的相似之处是外观相似的语法。

VBA is similar to Visual Basic 6, which is obsolete since about 1997 (?), so VBA is not a very modern language.

VBA 类似于 Visual Basic 6,后者自 1997 年左右就已过时 (?),因此 VBA 不是一种非常现代的语言。

VB.NET is a modern language, having the same capabilities as C#, but the syntax is terrible, so I personally prefer C#.

VB.NET是一门现代语言,和C#有同样的能力,但是语法很烂,所以我个人更喜欢C#。

VBA is an interpreted language, while VB.NET is compiled.

VBA 是一种解释型语言,而 VB.NET 是编译型的。

If you are interested in Office programming, you might consider doing your next Office project in VB.NET and VSTO, which is the modern alternative to VBA.

如果您对 Office 编程感兴趣,您可以考虑在 VB.NET 和 VSTO 中进行下一个 Office 项目,这是 VBA 的现代替代品。