Back

VB011

Implicit Variant return

Visual Basic 6
Warning
VB6

An untyped Function or Property Get returns Variant, spreading the typing trap to every call site

an untyped Function or Property Get returns Variant, spreading the typing trap to every call site.

Why this severity

an untyped Function or Property Get returns Variant, spreading the typing trap to every call site.


Known false positives

functions that deliberately return mixed types — rare, and worth an explicit As Variant anyway.

Remediation example

Function Calc(x As Long) As Long

Reconnecting… Connection lost. Reload