Visual Studio 宏编辑器
有没有办法更改默认宏编辑器:
感觉就像是 Visual Studio 2010 的降级。我可以将 Office 配置为使用它吗?
Is there a way to change the macro editor from this default one:
It feels like such a downgrade from Visual Studio 2010. Can I configure Office to use that instead?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,据我所知,VS.NET 不支持 VBA。
如果您要创建新的 Word 或 Excel 文件,您可以做的是创建托管 Office 解决方案,安装 VSTO 2010(Visual Studio Tools for Office)后,您可以创建在 VS 2010 和自动化语言中处理的托管文档不再是 VBA,而是 C# 或 VB.NET。
对于新文件,这是一个可行的解决方案,对于旧文件,如果它们很小,您可以转换它们,或者保留旧的 VBA 代码和旧的 VBA 编辑器,如图所示。
马克,我希望微软能够制作一个从旧格式转换为新格式的工具! :(
no there is no way to my knowledge, VS.NET does not support VBA.
what you can do if you are creating a new word or excel file is create a managed office solution, having installed the VSTO 2010 (Visual Studio Tools for Office) you are able to create managed documents which are handled inside VS 2010 and the automation language is not VBA anymore but C# or VB.NET instead.
this is a viable solution for new files, for legacy files either you convert them if they are small or you keep old VBA code and old VBA editor as in your picture.
Mark I wish MS made a tool to convert from the old format to the new one! :(
您可以采取一些措施来改进它:
工具>;选项>编辑:
取消选中“自动语法检查”
工具>选项>编辑格式:
自定义颜色和字体
安装 VBA Rubberduck:
http://rubberduckvba.com/
RubberDuck 会为您自动缩进。它还可以帮助您进行“单元测试、源代码控制、代码检查和重构”
There are things you can do to improve it:
Tools > Options > Editor :
Uncheck "Auto Syntax Check"
Tools > Options > Edit Format:
Customize the colors and font
Install the VBA Rubberduck:
http://rubberduckvba.com/
The RubberDuck does auto-indent for you. It also helps you with "unit testing, source control, from code inspections, and refactorings"