Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have inherited a lot of VBA code to maintain and so far I am using the VBE. Sometimes is quite hard to do some tasks, like advanced text search, so usually I export the module, edit the content with vim and import the modified module to test the code.

This can get a little messy and boring. I know that VBE can be COM automated, so I was thinking if there is a way (like a plugin or a script) to use an external Text Editor (vim, notepad++ or sublime text) to write VBA code and then refresh it automatically in the VBE

Thanks in advance

share|improve this question
up vote 4 down vote accepted

AkelPad has VB scripts enabled, so try to ask at Akelpad site about it. Also PSPad has.

share|improve this answer
Thank you, I'll be checking them – kb_sou Jan 23 '13 at 15:49
I made a script to refresh my project and AkelPad worked just fine. Thank you, @Ingo – kb_sou Feb 14 '13 at 11:49
How do I turn syntax highlighting on and choose the syntax language in AkelPad? – Ivan Aug 21 '14 at 13:17
@kb_sou Could you share some details about how you refresh the project please? – Scorchio Feb 20 at 11:56

Recently I found Text Edit Anywhere, and using one hotkey I can now get a notepad++ editor window synchronized with the Excel code editor.

The only problem I did not manage to solve so far is that Cyrillic letters fail to pass from notepad++ to Excel: as soon as I save the script once, all they are converted to question marks (although copy-paste from notepad++ preserves the letters). Other than that I'd highly recommend the solution: it allows you to edit text in any program with any editor.

share|improve this answer
I can't upvote this workaround enough times. – Scorchio Feb 20 at 12:00
Just tried that application because I was tiered (again) of the pretty basic VBE functionality concerning editing text. Combining this application with Sublime Text 3 + VBScript package using PATH\TO\ST3\subl.exe -nw "%1" with vba as extension to set correct file text automatically is a pretty decent solution for the moment. – Felix Bayer Jul 4 at 11:28

Sublime Text 2 can work with VBscript as well. You'll need this VBscript Package (github) to access the syntax.

enter image description here

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .