Smart Indenter version 4.0

The first version of the Smart Indenter COM Addin was released in 1999. After twenty-five years of faithfully serving the VBA developer community, version 4.0 has been rewritten in C# to support both 32-bit and 64-bit versions of Microsoft Office / Microsoft 365. As well as supporting all the existing options and shortcut keys, v4.0 adds Auto-Indenting, to automatically indent the current procedure as you type, according to your indenting choices.

Download Smart Indenter v4 from our new web site, OfficeAddins.co.uk.


Introduction

Smart Indenter Version 3.5 (released 10th February 2005) is available free for Office 2000/2002/2003, Visual Basic 6 and Excel 97

The Smart Indenter is a utility to tidy up VBA code by rebuilding the indentation of each line. Most developers naturally indent code within control structures, such as For...Next, If...End If, etc. Many developers also indent all the code within a procedure, to ease identification of line labels, error handling blocks etc. From that point on, there is much more variety in indenting styles, ranging from how to treat declaration lines to handling end-of-line comments.

The Smart Indenter includes the options shown below:

As the options are changed, the example procedure is re-indented to show the effect of the option and to give an indication of how your code will look after the indenting is complete.  Many of these options have been suggested by users of previous versions of the Smart Indenter program.  If there are other options that you'd like to see included in future versions of the program, please email stephen@oaltd.co.uk. Note that the Excel 97 version does not include the Hot-key indenting options.

The indenting algorithm should correctly handle all possible valid VBA code, including multi-statement lines, continued lines and line numbering.  If you find any VB or VBA code that compiles without error but is indented incorrectly, please email the code snippet.

The Smart Indenter is integrated into the Office 2000/2002/2003 VBE and Visual Basic 6 IDE and is accessed through menu items added to the Edit, Code Window and Project Explorer pop-up menus, or by user-defined hot-key combinations.  The routine can rebuild the indenting for the current procedure, current module or entire project in one pass, with full Undo available (if enabled in the Options dialog).  When undoing, the routine will not modify any lines that have been changed since the indenting was performed.

Versions

Version 3.5 of the Smart Indenter is available for Office 2000/2002/2003, Visual Basic 6 and Excel 97. The version for Office 2000/2002/2003 is an add-in for the VBA IDE, so works with all the Office applications and all other VBA6 hosts (such as AutoCad).

Versions are available for the following applications:

Application

Version Available

v4.0
v3.5
v3.5
v3.5
v1.0

Version 3.5 contains fixes for the following issues:

Contact and Support

If you have any questions about any of the utilities or example files found on this site, please contact us:

E-mail: support@oaltd.co.uk


Last Updated 13th March 2024


Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries