title: How do I stop my program from executing after a dialog box appears
body: <p>I have a problem where my code, a simple order form requires certain information. When the user does not enter a piece of information, the program displays a dialog box, and then after the user hits Okay, it still calculates the information. I am new to VB so here is the code snippet:</p>
  
  <pre><code> If (CheckBox3.Checked = False And blueBlackQuantityTextBox.Text &lt;&gt; "" And blueBlackQuantityTextBox.Text &gt; 0) Then
          MessageBox.Show("Please check item you wish to purchase", "No Item Selected",
        MessageBoxButtons.OK, MessageBoxIcon.Error)
          Stop
      End If
  
      Const whiteBlackDicePrice = 6.25
      Const redBlackDicePrice = 5.0
      Const blueBlackDicePrice = 7.5
      Const tax = 0.05
  
      Dim whiteBlackSubTotal As Double = whiteBlackQuantityTextBox.Text *      whiteBlackDicePrice
      Dim redBlackSubTotal As Double = redBlackQuantityTextBox.Text * redBlackDicePrice
      Dim blueBlackSubtotal As Double = blueBlackQuantityTextBox.Text * blueBlackDicePrice
      'newBalanceResultLabel.Text = String.Format("{0:C2}", newBalance)
  
      Dim subtotal As Double = whiteBlackSubTotal + redBlackSubTotal + blueBlackSubtotal
  
      whiteBlackTotalsLabel.Text = String.Format("{0:C2}", whiteBlackSubTotal)
      redBlackTotalsLabel.Text = String.Format("{0:C2}", redBlackSubTotal)
      blueBlackTotalsLabel.Text = String.Format("{0:C2}", blueBlackSubtotal)
  
      subtotalResultLabel.Text = String.Format("{0:C2}", subtotal)
  </code></pre>
  
  <p>putting a STOP after each IF statement, results in the program crashing, and I can only have the dialog box say: Okay.</p>
  
  <p>Please help!</p>