Inspection Details

VariableTypeNotDeclared


Summary
Warns about variables declared without an explicit data type.
Reasoning
A variable declared without an explicit data type is implicitly a Variant/Empty until it is assigned.
The following code example(s) would trigger this inspection:

Public Sub DoSomething()
    Dim value ' implicit Variant
    value = 42
    ' ...
End Sub

The following code example(s) would not trigger this inspection:

Public Sub DoSomething()
    Dim value As Long
    value = 42
    ' ...
End Sub


Back to List