title: How to add an if statement inside a for loop in VBA?
body: <pre><code>For a = 1 to 10
      if a = dumm then next a 'this statement should avoid running the subsequent codes if the if statement is true (similar to continue in c++
      end if
      'statements that need to run when the if statement is not true
  
  next a 
  </code></pre>
  
  <p>Why does this code not work?? It throws <strong>compile error: Next without for</strong></p>