title: Ending a Case Early
body: <p>So I have something like the following in Vb6;</p>
  
  <pre><code>Select case Case
  
  case "Case0"
  ...
  
  case "Case1"
    if Condition Then
       Exit Select
    End If
    *Perform action*
  
  case "Case2"
  ...
  
  End Select
  </code></pre>
  
  <p>But for some reason my <code>Exit Select</code> throws the error <code>Expected: Do or For or Sub or Function or Property</code>. I know, not pretty. Should I be using something else? I could just use <code>if</code> statements and not exit the case early, but this would require duplicate code, which I want to avoid. Any help would be really appreciated.</p>
  
  <p><strong>Update</strong></p>
  
  <p>Tried changing <code>Exit Select</code> to <code>End Select</code> and got the error <code>End Select without Select Case</code>. It is definitely within a <code>Select Case</code> and an <code>End Select</code>.</p>