forked from rubberduck-vba/Rubberduck
    
        
        - 
                Notifications
    You must be signed in to change notification settings 
- Fork 12
VariableTypeNotDeclaredInspection
        Mathieu Guindon edited this page Feb 24, 2015 
        ·
        3 revisions
      
    ###(disabled)
Inspection: VariableTypeNotDeclaredInspection
Description: Variable type is implicitly Variant
Type: CodeInspectionType.LanguageOpportunities
Default severity: CodeInspectionSeverity.Suggestion
This inspection finds declarations without an explicit As type declared, and without a type hint.
###Example:
foo is an implicit Variant in the below fairly common beginner mistake:
Dim foo, bar As Integer
###QuickFixes
QuickFix: Declare as explicit Variant
Not very clever, but good enough to satisfy this inspection for now:
Dim foo As Variant, bar As Integer
 @rubberduckvba
 @rubberduckvba