Inspection Details

ProcedureNotUsed


Summary
Locates procedures that are never invoked from user code.
Reasoning
Unused procedures are dead code that should probably be removed. Note, a procedure may be effectively "not used" in code, but attached to some Shape object in the host document: in such cases the inspection result should be ignored. An event handler procedure that isn't being resolved as such, may also wrongly trigger this inspection.
The following code example(s) would trigger this inspection:

Option Explicit
Public Sub DoSomething()
    ' macro is attached to a worksheet Shape.
End Sub

The following code example(s) would not trigger this inspection:

Option Explicit
'@Ignore ProcedureNotUsed
Public Sub DoSomething()
    ' macro is attached to a worksheet Shape.
End Sub


Back to List