This is simple add-in for VBA IDE in 64- and 32-bit host apps (such as Excel, Word, AutoCAD etc), which provides VBA code indent tool via Сode Window popup menu and, for additionally - some hotkeys for frequently used operations:
Сomment code lines: CTRL ALT NUM +
UnComment code lines: CTRL ALT NUM -
Toggle bookmark: CTRL ALT NUM *
Go to next bookmark: CTRL `~
Go to previous bookmark: CTRL SHIFT `~.
Packed binaries for 64- and 32-bit host apps are available at the Releases page.
Note that for 64- and 32-bit apps, you must use a corresponding bit DLL.
Before install, be shure that hotkeys of your background services, OS shell and other add-ins is not same with the add-in hotkeys.
-
Unpack DLL into local drive folder (C:\Addons\VBACH, for example)
-
Run with administrator credits at Windows command line:
For 64-bit host apps on 64-bit OS and for 32-bit host apps on 32-bit OS
C:\Windows\System32\regsvr32.exe C:\Addons\VBACH\VBACodeHelper.dll
For 32-bit host apps on 64-bit OS
C:\Windows\SysWOW64\regsvr32.exe C:\Addons\VBACH\VBACodeHelper.dll
-
Turn on "Loaded" checkbox in VBE add-in's dialog.
Just replace the addin's dll where it is located.
Use the same command with "/u" command line key, for example:
regsvr32.exe /u C:\Addons\VBACH\VBACodeHelper.dll
Code lines, which concatenated by underscore at the end of phisical line, would be concat into single phisical code line. If its undesirable for you, use "Selected Lines" indentation mode where it is necessary.
The mechanics of indenting VBA code is based on the original algorithm of Michael Ciurescu author VBTools AddIn.