Quote Originally Posted by jmcilhinney View Post
You only need to specify one number in each case. In the first case you specify less than or equal to 20. In the second case you specify less than or equal to 40. If you make it to the second case then you already know the value greater than 20 because it would otherwise have been caught by the first case, so greater than 20 is implicit. The same goes for each subsequent case, e.g.
Code:
Dim number As Integer

If Integer.TryParse(TextBox1.Text, number) Then
    Select Case number
        Case Is <= 20
            MessageBox.Show("Input is in range 0 <= N <= 20.")
        Case Is <= 40
            MessageBox.Show("Input is in range 20 < N <= 40.")
        Case Is <= 60
            MessageBox.Show("Input is in range 40 < N <= 60.")
        Case Else
            MessageBox.Show("Input is greater than 60.")
    End Select
Else
    MessageBox.Show("Input is not a valid integer.")
End If
would'nt that show 3 textboxes if the number is between 1 and 20? because all of them are under 60?
Sorry if you implied that in your sentence.