title: Run-time error '438' Object doesn't support this property or method - At rowcount 0
body: <p>I wrote a VBA script that runs through a bank statement finding payments of a certain value.  This code ran when I wrote it, but a couple of months later I get Run-time error '438' Object doesn't support this property or method; here is an extract of the code.</p>
  <pre><code>Set bankWB = ActiveWorkbook 
  Set bankWS = ActiveSheet 
  
  For rowcount = 0 To 250 
  skipline = False
  If bankWS.Cells(rowcount, paidcol) = 5 Then
      payee = Trim(bankWS.Cells(rowcount, payeecol))
      paid = &quot;5&quot;
  </code></pre>
  <p>The error occurs on the 'if' line.</p>
  <p>I've found various examples that reference cell values in the same way and this worked previously.  If you Google this error there are lots of results and I see that using 'range' is more common than using 'cell' to reference a single cell, but it's not obvious to me how to easily translate my (x,y) cell variables/loop into a range &quot;A1&quot; type value so I've not tried rewriting the code to use range instead yet.</p>
  <p>I assume that the object is bankWS.Cells and it's the property rather than the method that is the problem. I want to know what the value of the object is (=property), I'm not trying to do anything with the object (=method)</p>
  <p>I've seen lots of different ways of writing the cell object, and tried various permutations, none of which make a difference. eg.</p>
  <pre><code>If worksheet.bankWS.Cells(rowcount, paidcol) = 5 Then
  If bankWS.Cells.item(rowcount, paidcol) = 5 Then
  If bankWS.Cells(rowcount, paidcol).value = 5 Then
  </code></pre>
  <p>I'm thinking that the code is ok, and that something else has changed.</p>
  <hr />
  <h3>Solved</h3>
  <p>Thanks to @99moorem my row count loop should have started at 1, not 0, there will be no cell(0,1).</p>