title: Textbox input range of numbers
body: <p>I'm trying to handle my textbox input values. I want the user to only be able to input numbers within a range using KeyPress. Ex. (0 - 1000). I have the code to prevent any input thats not a number. I can't quite figure out how to prevent the user from inputting a value thats not within a certain range. </p>
  
  <pre><code>Private Sub txt2x6LumberQuanity_KeyPress(sender As Object, e As KeyPressEventArgs) Handles   txt2x6LumberQuanity.KeyPress
      If Not Char.IsNumber(e.KeyChar) And Not Char.IsControl(e.KeyChar) Then
          e.Handled = True
      End If       
  End Sub
  </code></pre>
  
  <p>Does anybody have any suggestions. I've spent a couple hours searching but can't seem to find the right solution.</p>