title: Excel VBA For Loop Error
body: <p>I'm trying to run a simple For loop which will be expanded to include more functionality later but having trouble as it keeps throwing an error "invalid next control variable reference". The code I am trying to use is listed below.</p>
  
  <pre><code>Sub Tickbox()
  
  Set Location = Sheets("TickBoxSheet").Range("B:B")
  
  i = WorksheetFunction.CountA(Location)
  
  Sheets("TickBoxSheet").Range("B2").Select
  
  
  For a = 1 To i
      If Selection.Value = "True" Then
          Row = Selection.Row
          'Hide some rows in another sheet via if statements
  
          ActiveCell.Offset(1, 0).Select
      End If
  Next i
  
  End Sub
  </code></pre>
  
  <p>I don't know if I need more coffee this morning but I can't seem to figure out what the hell is going on. Any help will be greatly appreciated.</p>