Excel Member May Return Nothing
Locates instances of member calls made against the result of a Range.Find/FindNext/FindPrevious method, without prior validation.
Reasoning
Range.Find methods return a Range object reference that refers to the cell containing the search string; this object reference will be Nothing if the search didn't turn up any results, and a member call against Nothing will raise run-time error 91.
Default severity
Warning
Inspection type
CodeQualityIssues
This inspection will only run when the Excel library is referenced
Examples
This example should trigger a result
This example should NOT trigger a result
Rubberduck.CodeAnalysis.Inspections.Concrete.ExcelMemberMayReturnNothingInspection.cs (Prerelease-v2.5.9.6289)