Introducing Code Manager

AS you know, we here at DDoE never take a vacation. Except for the day after Thanksgiving. And Christmas. And about 325 other days in the year. Thankfully, Dennis Wallentin wrote about a new tool he’s developed and allowed me to post it here.


This project started out one year ago, in November 2015. It’s been a long road and not always an easy way. The project itself has been difficult. I’ve been forced to rewrite it one time (crash) and been struggling with several “funny” issues.

Life is not always an easy ride. Health issues has from time to time prevent me from continue to develop this project as well as several other projects. A To-Do-List should, over time, decrease and not, as in my case, increase. But life can sometime be a bug that effectively prevent us from what we want to do, right?

I must explicitly thank Ron (de Bruin). Not only for being a good friend but for giving me great support with this project. The truth is that without him this project would not have been finalized. I’m amazed what Ron has done for the online community over the years, especially for those who work with MS Excel and MS Office on Apple’s desktop.

Anyway, the Code Manager is a project that I will continue to develop by adding new tools to it. Compared with other development tool the VB Editor is outdated. It’s remarkable that Microsoft still haven’t realized that VBA and the VB Editor is the first choice for the larger group of Excel power users and developers. The best Microsoft can do is to do a total makeover of the VB Editor and update it to today’s standard!

What is Code Manager?

It’s a toolbox for professional Excel/VBA-developers which will include several tools for various coding tasks.

Code Manager can run on both x86 and x64 Windows platforms. It’s a managed COM add-in that can be used for both the x86 version of MS Excel 2010 and later as well as for x64 of MS Excel.

It will always be free of charge.

In the first version of Code Manager Toolbox only one tool is available

  • Code Indentation.

Code Indentation is a versatile tool to manage all VBA code. It can operate with code in the VB Editor as well as with standalone vb-files, cls-files and txt-files.

Overview of Code Indentation
The Code Indentation tool can work with VBA-code in the VB Editor in MS Excel and in standalone files with the extension of vb, cls and txt.

When working with code in the VB Editor we can target three levels of code:

  • Individual Procedures
  • Individual Code Modules
  • All Code Modules in active Workbook

To make it simple and easy to use these commands, i.e. to indent the code, it’s available in two ways:

Select the command Code Manager > Indentation in the VB Editor’s toolbar and select the operation you want to be carried out as the following image shows:

Right-click in the VB Editor and select the command Code Manager. Next, select the operation you want to execute as the following image shows:

To work with standalone files that contain VBA code and to interact between the VB Editor and standalone files, the Code Editor in Code Manager can be used. It’s also via the Code Editor that all settings can be made. The following image shows the Code Indentation tool in the Code Manager:


In order to improve the tools, I welcome any feedback and suggestions of additional tools to be included in the Code Manager toolbox.

E-mail feedback and suggestions to:


To install it, first unzip the file and then execute setup.exe by just double clicking on the exe file and follow the instructions on the screen.

The zipped file can be downloaded from Ron de Bruin’s excellent site:


The following requirements must be met before using Code Manager:

  • Microsoft Windows XP and later.
  • Microsoft .NET Framework 4.5 and later.
  • Microsoft Excel 2010 and later.

The following tools have been used to develop Code Manager with:


The Code Manager is made available based on the MIT License (MIT).

Special thanks go to Ron de Bruin and Ken Puls.

© 2016 Dennis M Wallentin

20 thoughts on “Introducing Code Manager

  1. Dick: Great intro.

    Dennis: Thanks for the early xmas gift. I’ll check it out. My only reservation so far is that you missed a comedy opportunity in your write-up, by leaving this alternative wording on the table:

    In the first version of Code Manager Toolbox the following tools are available, listed in no particular order:
    1. Code Indentation.

    Can’t wait for that list to grow, but I’m thrilled that there’s an indenter right at the top of it. If anyone’s convoluted code needs indentation, it’s mine! -)

  2. Jeff,

    You’re welcome although I’m not Santa Claus (You will get Your X-mas gifts as usual.)
    Point taken!


  3. Well done.
    Two days ago, I had a long indentation day Adding a long SQL-scripts via PowerQuery.
    That night I dreamt that Santa granted me two gifts 1. the script could be imported, or 2. the copy/paste script could be indented.

  4. Hello Dennis,

    Great to finally see a viable replacement for the old Smart Indenter add-in.
    Having just upgraded to Office 2016 this was one tool I really missed.

    Does anyone know anything about another free, open-source COM add-in called Rubberduck ???
    Has anyone used this and how does it compare to Dennis’s indenter ???


  5. Awesome project!

    I gave up my hopes that MS is reworking the VBE. :-(

    It looks like this is an extendable platform for a lot of tools. Might make sense to open source it so people could contribute? I’m playing with the thought of building a git integration to the VBE since ages – this might be the platform for it…

    Thanks, Peter

  6. Works great. I had some minor issues when installing…if I simply double-click my downloads file and then tried to install it directly from the 7-zip folder that appears, I see the following error message:
    Unable to locate application file ‘Code Manager Setup.msi

    But once I copy both files to my drive and run the .exe again, it installs fine, and runs like a dream.

  7. Hi,
    Thanks for the feedback.

    Open Source is something that I would like to do. But today it’s not possible to create managed COM add-ins without one or more additional commercial licenses.
    Ask Microsoft why!
    Visual Studio.NET had previously a template to create managed COM add-ins with but it was removed from later editions.
    Ask Microsoft why!
    We have the option to create VSTO add-ins or Office Add-ins (JavaScript/CSS/HTML5). VSTO is no longer developed, i e it’s a dead end and the later lack support for the VB Editor.
    Ask Microsoft why!

    Back in 2013 I walked away from the MVP-Program mainly because of Microsoft lack of loyalty towards their MS Excel developers and the lack of long term strategy for working with MS Excel add-ins. They simple ignore the needs.

    You should always unzip a package before trying to install :-)


  8. David,
    When RubberDuck 2.0 is out I will make a review here about it.
    The new version will include an indenter, based on Bullen/Bovey SmartIndenter.
    It will also include a tool that include the database I compiled for my tool for Windows API for MS Excel.

    Kind regards,

  9. @Dennis – Using Office XP Developer Edition (2002) we could create COM Add-ins – directly from Excel VBE
    From Office 2003 they discontinued the developer Edition – Ask Microsoft why :-)

    Wish list for further releases
    1. Everything present in MZ-Tools – especially clear all option in the immediate window
    2. Display long paths in the References Dialog

  10. sam,

    That’s indeed true! How could I forget it? I still have the book as well as the package so I will see if can install it on Windows 7, Excel 2007 and VB6. Maybe You have already test it?

    Thanks for reminding me. Yes, another “why” to add ;-)

    1. MZ-Tools is an excellent tool. I would rather see that MZ-Tools, RubberDuck and CM compliment each other.
    Some features may be added to CM although they exist in both these tools. But it will then be with another approach. That’s the way it works for me. If I find something can be done better (?) I will add it.
    2. Noted and appreciated.

    One user sent me an e-mail and pointed out that with large workbooks it will be lot of (manually) savings. Actually, it was something that was pointed out in the beta test but I ignored it in the first public version. In other words, it will be an update in view of this.

  11. Hi Dennis,

    Looks good!

    By coincidence, I was working on my code indenter today. Planning to upload it soon, but my site is down, hopefully temporarily.

    Anyway, keep up the great work!


  12. Andrew,

    Thanks, looking forward to take part of Your solution as I suspect it’s a native vba solution.

    You too keep up the good work!

    Take care.

  13. I have a paid version of MZ-Tools, one of the few paid pieces of software I own. Sadly I think I prefer the old, free VBA 3.0 version. I end up not using its code indenter that much. I’m not sure why, except for the fact that it automatically indents everything in a procedure. The Bullen version has an option not to indent everything, in other words you can keep the outermost part of the code unindeneted. Does yours?

    I saw the post from RubberDuck a few months ago announcing they were inheriting the Bullen indenter code and would include it in 2.0. I wonder when it will come out? I checked back for a while, but haven’t lately.

    I recently noticed that both Stephen’s addins work in the Office 365 Pro Plus version of 2016 that I have at work. I also see that this version adds a bit of color to the icons in the Toolbox form. I got excited when I first saw this, as it’s the only visual “update” I’ve ever noticed to the VBE in my 15+ years of using it.

    The other Bullen addin, referred to above, is the one for moving controls around on a form. It’s called VBE Tools. I use(d) that a lot. It also adds a right-click option to let you rename a control and update all code that refers to it. Very handy! For a long time I thought that was part of MZ-Tools. It also has one other feature: you can read the full paths of DLLs in the Tools>Reference dialogs. It also works in the 365 version, but not in whatever version of 2016 that I have at home.

  14. Dennis, I downloaded Code Manager and answered my own question: there is no option to not indent the entire procedure. I didn’t see any options like that. One of the nice things about Stephen Bullen’s indenter was the amount of options that let you fine-tune exactly how code was indented.

    I’m also confused by the prompts to save the workbook. I suppose if I read the documentation above it might explain it, but lunch is almost over :-). I did note that the “Entire Workbook” menu item prompts me to save the workbook, whereas the Ctrl-Shift-W shortcut did not. One other note: when I open Code Manager and then close using the red “X” (the only way I tried) I am returned to the main Excel window, even though I opened it from the VBE.

    I hope that’s all helpful.

  15. Doug,
    To indent one procedure in the vbe editor (not in the Code Editor) place the cursor inside the procedure and select the command to indent.
    I may consider to add this option to the Code Editor as well. At present I have one developed version to indent one or more procedures in the Code Editor.
    The request to constantly save will be removed in next edition.
    Next edition is scheduled to late January 2017.

  16. @Dennis, I’d like to clarify. The feature I want is to be able to apply indenting but not have everything inside a Sub indented. For example I don’t want the Dim statements or any other “outermost” levels of code to indent, I want them flush with the word “Sub.” I’ve always thought it a waste to immediately indent everything between Sub and End Sub. Does that make sense? Again, it’s an option in Bullen’s indenter.

  17. Hey guys. LOVE Code Manager. 🎉

    Just wanted to report a bug… CM does not indent Property blocks inside class modules. In fact, it strips all indenting and puts the code in a single block.

Posting code? Use <pre> tags for VBA and <code> tags for inline.

Leave a Reply

Your email address will not be published.