However, this can also occur when you define a variable -- especially a
procedure parameter -- then forget to use it. Maybe you wanted to track
something or do something special based on a value but failed to do so.
Rather than simply deleting the variable, you need to determine its purpose
and make sure it's no longer necessary or implement it correctly.

Easy to Use

The Unused Variable Analysis is simple to use. Invoke it from the Total
Visual CodeTools menu or toolbar, then select the objects to examine. It can
be the entire project, one module, or one procedure.

Example of selecting all modules from Northwind

Powerful Analysis

The powerful VB6/VBA code parser in Total Visual CodeTools examines all
the selected modules to determine what variables, constants, etc. are
defined. It also determines where they are used to see which items are never
used. The list is provided in the results.