title: VB Prevent negative integers
body: <p>I am just starting my first class on VB, and my teacher hasn't responded to email in 48 hours and my project is due soon. I am hoping you guys can help me solve this. What I am trying to do is get a program to calculate the total of 3 text boxes and display it in a single label. The catch is, the input in the 3 text boxes cannot be a negative number. I am trying to set it so when a negative number is input it displays a message to enter positive numbers only. However every time I run the program it just calculates the text box with a negative number as 0 and completes the rest of the calculations. Here is my code:</p>
  
  <pre><code>Private Sub btnCalc_Click(sender As Object, e As EventArgs) Handles btnCalc.Click
      Dim intPackA As Integer
      Dim intPackB As Integer
      Dim intPackC As Integer
      Dim intCalc As Integer
      Try
          If txtPackA.Text Or txtPackB.Text Or txtPackC.Text &lt;= 0 Then
              lblCalc.Text = "Please enter positive numeric values"
          End If
          If txtPackA.Text &gt;= 0 Then
              intPackA = txtPackA.Text * 79.2
          Else
              lblCalc.Text = "Please enter positive numeric values"
          End If
          If txtPackB.Text &gt;= 0 Then
              intPackB = txtPackB.Text * 119.4
          Else
              lblCalc.Text = "Please enter positive numeric values"
          End If
  
          If intPackC &gt;= 0 Then
              intPackC = txtPackC.Text * 149.5
          Else
              lblCalc.Text = "Please enter positive numeric values"
          End If
  
          intCalc = intPackA + intPackB + intPackC
  
          lblCalc.Text = "Package A:  " &amp; intPackA.ToString("c") + vbCrLf &amp; "Package B:  " &amp; intPackB.ToString("c") + vbCrLf &amp; "Package C:  " &amp; intPackC.ToString("c") + vbCrLf + vbCrLf &amp; "Grand Total: " &amp; intCalc.ToString("c")
      Catch
          lblCalc.Text = "Please enter positive numeric values"
      End Try
  
  End Sub
  </code></pre>
  
  <p>I know some of the else and if statements are redundant, however if you could give me some pointers on an easy way to condense and clean up as well I would appreciate it.</p>