Late last year, I started work on a new set of VBE tools. It’s an extension of a code indenter that I made several years ago. I thought it would be nice to update it.
So far I’m up to Version 1.6. It’s freeware, but I’m starting work on a shareware version that will have more stuff. Anyway, here’s what I blogged about it on my site. Give it a try if you like!
Access AET VBE Tools by right clicking within the active code pane.
Here are the tools.
Indent code within the active VB project, module, procedure or selected text.
Add Line Numbers
Add line numbers to code within the active VB project, module, procedure.
Delete Line Numbers
Delete line numbers from code within the active VB project, module, procedure.
Export code from the active VB project, module, procedure to text files.
Select modules from projects.
Code from both modules will be exported to worksheets in a new workbook.
Code that exists in one module, but not the other (and vice versa) will be highlighted.
You can copy code/modules between projects.
Standard modules, class modules and userforms will be be replaced if they exist (have the same name), or added if they don’t exist.
ThisWorkbook code will be replaced.
Sheet module’s code will be replaced if the sheet exists, or worksheets will be added with the new code if they don’t exist.
Macro Comment Tools
A handy way to add generic comments to all macros in the active project or module.
Insert Code Snippets
Tired of entering the same code all the time? This makes it easier.
Run Favourite Macros
Yes, you can already run them from your Personal workbook.
But now you can also export your favourite code to text files. Note: Not all code will run. This is a experimental tool, but I have found it quite useful when coding myself.
Multiple Find And Replace
You can find and replace code with several fields at once. Fields are saved between sessions.
Just 2 options at the moment. You can delete lines of code that have “Debug.Print”, and also delete excess blank lines. (Only a single blank line will remain)
Highlight Code In Excel
Export your code to a worksheet in a new workbook. Selecting cells in Column A that have keywords like If, With, Select, etc will be highlighted so you can see where that part of the code begins and ends. This is very beneficial to your mental health when trying to figure out what connects with what in those long, long procedures.
Last, but not least, there are various settings available.
Download AET VBE Tools v1.6 here.