title: Run-time error '91' VBA when trying to find a match in Worksheet
body: <p>I am trying to Find a specific string in a Range. Run-time error '91'keeps showing up. I understand this happens because the Find function does not find any coincidence. Nevertheless I am unsure why this is happening.</p>
  <p>Currently I have a Listbox in a Userform. When I select an option in the Listbox, the string of such selection will be shown on a Userform Textbox (txt_selected). On a worksheet I have exactly the same list as displayed on the Listbox. I want to find the row in the worksheet where there is a coincidence with the selected element.</p>
  <p>I have an if statement which is triggered when there is a match found (countif&gt;0), displaying a MessageBox with the message &quot;Match found&quot;. However, when I try to find the row number of the match I get the error.</p>
  <p>My code is the following:</p>
  <pre><code>Private Sub lstbx_diarias_Click()
  
  For n = 0 To (UserForm1.lstbx_diarias.ListCount - 1)
      UserForm1.txt_selected.Value = UserForm1.lstbx_diarias.Text
  Next n
  
  End Sub
  
  
  Sub llenar_checklist()
  
  Dim result_row As Long
  Dim actividad As String
  Dim look_range as Range
  
  ''' Actividades Diarias
  If UserForm1.chbx_diarias.Value = True Then
  
      Set look_range = Sheets(&quot;Checklist&quot;).Range(&quot;C9:C23&quot;)
  
      actividad = UserForm1.txt_selected.Value
  
      If Application.WorksheetFunction.CountIf(look_range, actividad) &gt; 0 Then
  
          MsgBox &quot;Match found&quot;
          result = look_range.Find(what:=actividad, LookIn:=xlValues, LookAt:=xlWhole)
          result_row = result.Row
  
      End If
      MsgBox &quot;The row is &quot; &amp; result_row
  
  End If
  
  End Sub
  </code></pre>
  <p>According to VBA, the error comes from line where result if defined. Any ideas why this may be happening?</p>
  <p>Thanks a lot in advance.</p>