VB028
Global mutable state
Visual Basic 6
Warning
VB6
Public/Global variables in a
Public/Global variables in a .bas module are writable from everywhere — the invisible coupling that makes legacy behaviour impossible to reason about.
Why this severity
Public/Global variables in a .bas module are writable from everywhere — the invisible coupling that makes legacy behaviour impossible to reason about.
Known false positives
app-wide configuration written once at startup.
Remediation example
Private mConnString As String
Public Function ConnString() As String
ConnString = mConnString
End Function