|
||||||||||||||||||||
How to indent your VBA macro code
using the Smart Indenter When you write your VBA macro code, it helps readability to indent the code. For example, the statements between a For..Next loop are indented to show that they are within the loop. One problem that seems to happen to everyone is the indentations get messed up! Manually fixing is a pain. Office Automation has released a free product called the Smart Indenter that will indent your code for you you. To install, you must run as Admin. Download and right click on the file and select 'Run as Administrator".
Memory usage: The Smart Indenter is a COM add-ins. It fully opens all the time. COM add-ins typically use a noticeable amount of Excel memory. However, this one is extremely small COM add-in. We have found that having several large COM add-ins open at one time makes Excel unstable (all of our add-ins are VBA add-ins). To see if you have COM add-ins installed and to remove, use the Add-In Information Lister, which provides easy access to the COM add-ins control panel. When you install the Smart Indenter, it adds a menu item to the Edit menu of the Visual Basic editor. Simply select the option you want to run, and click OK on the confirmation dialog. Indenting an entire project is extremely fast. There are quite a few options with the Smart Indenter:
|
||||||||||||||||||||
|