What
Bring to the users attention that they're implicitly accessing a member.
Inspection: CodeQuality.
Why
Using WorksheetFunction.FooBar or anything else that's on the hidden Global member deprives users of knowing where they're accessing the member from. Them knowing that a hidden member is providing this member educates them.
Example
This code should trigger the inspection:
Public Sub Foo()
Debug.Print WorksheetFunction.Text(2 / 16, "# ??/??")
End Sub
QuickFixes
If static analysis enables Application to be determined.
QualifyHiddenGlobalMemberAccessQuickFix
Example code, after quickfix is applied:
Public Sub Foo()
Debug.Print Application.WorksheetFunction.Text(2 / 16, "# ??/??")
End Sub
Resources
Each inspection needs a number of resource strings - please provide a suggestion here:
What Bring to the users attention that they're implicitly accessing a member. Inspection: CodeQuality.
Why Using
WorksheetFunction.FooBar
or anything else that's on the hiddenGlobal
member deprives users of knowing where they're accessing the member from. Them knowing that a hidden member is providing this member educates them.Example This code should trigger the inspection:
QuickFixes If static analysis enables
Application
to be determined.QualifyHiddenGlobalMemberAccessQuickFix
Example code, after quickfix is applied:
Resources Each inspection needs a number of resource strings - please provide a suggestion here:
{0}
is is unqualified.