title: "Block if without end if" error VBA
body: <p>I tried looking through the other answers, but nothing really seemed to help me out.  As the title states, I'm getting a "Block if without end if" error.  I'm trying to put in a conditional statement that ends the sub if its met.  To be more specific, I'm formatting data that can only be formatted one job at a time.  I want to automatically end the sub if it determines there are multiple jobs in the spreadsheet.  Here's what I've got so far.</p>
  
  <pre><code>Sub SUBNAMEHERE
  
  (Lots of other code)
  
  JobNo = (code that figures out how many jobs there are)
  If JobNo &gt; 1 Then
      MsgBox (warning message)
      End Sub
  End If
  
  (The rest of the code)
  </code></pre>
  
  <p>If anyone could help me out, it would be much appreciated.</p>