title: Function to find row based on cell value
body: <p>I have the following code to find the row where a certain value resides, however it keeps debugging with </p>
  
  <blockquote>
    <p>Error 91 "Object variable or With block variable not set"</p>
  </blockquote>
  
  <p>Which is weird because I use the same structure to find a row before this procedure and it works.</p>
  
  <pre><code>wbs.Activate
      Cells.Find(What:="Name", After:=wbs.Range("A1"), LookIn:=xlFormulas, _
        LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
        MatchCase:=True, SearchFormat:=False).Activate
      NameRow = ActiveCell.Row
  </code></pre>