Inspection Details
RedundantByRefModifier
- Summary
- Identifies redundant ByRef modifiers.
- Reasoning
- Out of convention or preference, explicit ByRef modifiers could be considered redundant since they are the implicit default.
This inspection can ensure the consistency of the convention.
- The following code example(s) would trigger this inspection:
-
Option Explicit
Public Sub DoSomething(ByRef foo As Long)
foo = foo + 17
Debug.Print foo
End Sub
- The following code example(s) would not trigger this inspection:
-
Option Explicit
Public Sub DoSomething(foo As Long)
foo = foo + 17
Debug.Print foo
End Sub
Back to List