Code Explorer for better navigation and more

Code Explorer

The Code Explorer is a replacement for the VBA editor's built-in Project Explorer adding many additional features. You can access these features by using right-click on a selected tree item (module or procedure).

Procedure item actions

Code Explorer shortcut menu
  • Navigate easily between procedures (Go To or double-click);
  • Run a macro without having to move into it;
  • Insert procedure call code into cursor position;
  • Insert a procedure call in the Immediate window to easily run it multiple times;
  • Comment out code by adding comment character ' to all lines in the procedure<;/li>
  • Inserts code to handle run time errors using one of the available error handling strategies;
  • Add line numbers. These help locate where an error occurred;
  • Make code indentation reflect the procedure logic;
  • Add the procedure to code library
  • Select: select code of procedure, for example for copying;
  • Delete the selected procedure;
  • Rename procedure. You will be asked: 'Do you want to apply the new name to all its calls in the code?'. This way you don't have to manually find and replace the call in all the modules where it is used.

Module item actions

Code Explorer shortcut menu module
  • Insert new module, class or userform. The latter two open the Class Builder and UserForm Builder respectively;
  • Import File...: adds module from file (project or module node)
  • Export File...: saves as file (module node). You are asked to give a name and location in the VBA code library
  • Code Indentation: When applied from a module or procedure all code is correctly indented making it much more readable.
  • Rename: Rename module.
  • Delete: delete the selected module
  • Print as HTML: create html page for selected item
  • UserForm actions:
    • View Object: open the form in design mode
    • View Code: navigates to the selected items code (also double-click).
  • [Access Form/Excel Sheet] Properties: opens the properties pane for the selected object

Move procedures using drag and drop

In the Code Explorer you can move both procedures and modules using drag and drop.

  • Procedure drag and drop: move if in same project, copy if dragged to other project
  • Module drag and drop: copy if dragged to other project - else nothing.