title: Setting worksheets dynamically in VBA
body: <p>I have 66 sheets in my document (Sheet1, Sheet2, Sheet3, ...) and I'm trying to access all of them with the following code:</p>
  <pre><code>Dim currentSheet As Worksheet
  For i = 1 To 66
      Set currentSheet = &quot;Sheet&quot; &amp; Cstr(i)
  Next i
  </code></pre>
  <p>However, I get the &quot;type mismatch&quot; error. It seems I cannot set a worksheet using a string. How can I make this work?</p>