推荐的 VBA IDE

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4228061/
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 10:56:57  来源:igfitidea点击:

Recommended IDE for VBA

excelvbaexcel-vba

提问by notnoop

Is there a recommended IDE for developing Excel VBA macros that provides reasonable error reporting and code completion?

是否有推荐的 IDE 用于开发提供合理错误报告和代码完成的 Excel VBA 宏?

Currently, I'm using "Microsoft Visual Basic For Application" IDE which comes with Excel 2007, but so far, it is less than ideal.

目前,我正在使用 Excel 2007 附带的“Microsoft Visual Basic For Application”IDE,但到目前为止,它并不理想。

Even a plug-in to Vim or Emacs will be great.

即使是 Vim 或 Emacs 的插件也会很棒。

回答by J?rg Brenninkmeyer

I use and recommend Rubberduck. Description from the website:

我使用并推荐Rubberduck。来自网站的描述:

Rubberduck is a very active open-source COM add-in project that integrates with the Visual Basic Editor to enable the features every programmer wants to have in their IDE. From unit testing to source control, from code inspections to refactorings, programming in VBA will never be the same.

Rubberduck 是一个非常活跃的开源 COM 插件项目,它与 Visual Basic 编辑器集成,以启用每个程序员都希望在其 IDE 中拥有的功能。从单元测试到源代码控制,从代码检查到重构,VBA 中的编程永远不会相同。

回答by mwolfe02

You're pretty much stuck with MS's IDE, but there are some good add-ons available. The two that I use constantly are:

您几乎无法使用 MS 的 IDE,但也有一些不错的附加组件可用。我经常使用的两个是:

回答by ja72

Take a look at this SourceTools.xla. It is not a IDE, but an add-in for VBA that allows to save/read the all source files from your project into actual text files for use with source control. I have been using it for at least a year and I am very happy. It even allows direct use if CVS or SVN source control systems for commits/diff, but you don't have to do it from the IDE. And it is free and it comes with the source code unlocked if you want to tweak it.

看看这个SourceTools.xla。它不是一个 IDE,而是一个 VBA 插件,它允许将项目中的所有源文件保存/读取到实际的文本文件中,以便与源代码控制一起使用。我已经使用它至少一年了,我很高兴。如果 CVS 或 SVN 源代码控制系统用于提交/差异,它甚至允许直接使用,但您不必从 IDE 执行此操作。它是免费的,如果你想调整它,它会附带解锁的源代码。

回答by kdo53

(I realize this question is 7 years old, but I had the same question so I'm just sharing a solution I went with.)

(我意识到这个问题已经有 7 年历史了,但我有同样的问题,所以我只是分享一个我使用的解决方案。)

I've just recently started working with VBA with MS Excel and noticed it's really easy to lose all your code with the macros option if something crashed or was deleted.

我最近刚刚开始使用带有 MS Excel 的 VBA,并注意到如果某些内容崩溃或被删除,使用宏选项很容易丢失所有代码。

Atom.io is a great IDE for any language to just easily type some code and save. I already use it for python and some easy scripting languages to check my syntax. I actually found a package for VBScript/VBA syntax highlighting: here!

Atom.io 是一款出色的 IDE,适用于任何语言,只需轻松键入一些代码并保存即可。我已经将它用于 python 和一些简单的脚本语言来检查我的语法。我实际上找到了一个用于 VBScript/VBA 语法突出显示的包:here

You can download it right in Atom:

您可以直接在Atom 中下载它:

  • Click File -> Settings -> Install
  • Search language-vbscript
  • Click Install
  • 点击 File -> Settings -> Install
  • 搜索 language-vbscript
  • 点击 Install

And you're all set to open, edit, and save .vbafiles.

您已准备好打开、编辑和保存.vba文件。