title: VBA: Why isn't my FOR loop returning anything?
body: <p>The <em>overall</em> goal is to return the <em>characters</em> in between the commas and use each of them in another piece of code. If anyone knows a more optimal way of doing this, please let me know.</p>
  
  <p><strong>The problem:</strong> </p>
  
  <p>I am trying to find the positions of the commas in the string.</p>
  
  <p><strong>The string:</strong> </p>
  
  <pre><code>Dim st As String
  st = "1642377,001642381,010301642379"
  </code></pre>
  
  <p><strong>My attempt:</strong></p>
  
  <pre><code>For pos = 1 To Len(st)
  
       If Mid(st, pos, 1) = "," Then
  
           MsgBox ("Position of comma:" &amp; pos)
  
       End If
  
   Next
  </code></pre>
  
  <p><strong>Currently returning:</strong></p>
  
  <p>The code doesn't return anything. The <code>If</code> condition isn't returning true.</p>
  
  <p><strong>Expected result:</strong></p>
  
  <p>A <code>MsgBox</code> should pop up twice, showing the position of the comma each time.</p>