Quickly fix common code issues across a procedure, module, or project.
From the Inspection Results toolwindow, select an inspection result; the Fix dropdown menu lists all available quick-fixes for the selected result. Alternatively, simply right-click the result you want to apply a quick-fix to, and select the appropriate fix from the context menu.
Keep in mind that while static code analysis can easily and reliably spot syntactical elements (e.g. access modifiers, implicit keywords, etc.), analysis of code semantics is only as accurate as the internal representation of the code, and while 100% accuracy is the goal, in many cases it’s simply impossible: late-bound member calls (implicit or not) cannot be resolved, for example procedures invoked outside the VBA project (e.g. Excel user-defined functions, macros invoked by Access reports, etc.) are going to be reported as not used. Never blindly apply a quick-fix across an entire scope, module, or project, without first reviewing every individual result for a given inspection.
Exactly what a particular quick-fix does is entirely up to its implementation, but running any quick-fix will trigger an automatic reparse.
This tab lists all items found in the .xml documentation assets from the latest pre-release build. To modify this content, a pull request must be merged into the [next] branch.
Replaces the Dim keyword with Private in a module-scoped declaration.
Changes 16-bit (max value 32,767) Integer declarations to use 32-bit (max value 2,147,483,647) Long integer type instead.
Adjusts a Sub procedure to be a Function procedure, and updates all usages.
Adjusts a Function procedure to be a Sub procedure. This operation may result in broken code.
Assigns an explicit data type to an implicitly typed declaration.
Adds an explicit Variant data type to an implicitly typed declaration. Note: a more specific data type might be more appropriate.
Runs the 'Encapsulate Field' refactoring, which prompts for identifier names for the new property and its value parameter.
Replaces bang operators ('dictionary access') with explicit default member calls.
Makes default member calls explicit.
Adds an '@IgnoreModule annotation to ignore a inspection results for a specific inspection inside a whole module. Applicable to all inspections whose results can be annotated in a module.