Skip to content

VariableNotDeclaredInspection

Mathieu Guindon edited this page Feb 24, 2015 · 3 revisions

###(disabled)

Description: Variable is not declared

Type: CodeInspectionType.CodeQualityIssues

Default severity: CodeInspectionSeverity.Error

This inspection finds variables that are used, but not declared (a compile-time error with Option Explicit).

###Example:

Variable foo is not declared:

Public Sub DoSomething()
    Dim bar As Integer
    bar = foo
End Sub

###QuickFixes

This inspection does not have any quickfix; it mostly serves as a pre-compilation warning, that is really useful only when Option Explicit is not specified.