Slap some Val() functions into Tylor's statement would work perfectly. Here is an example that does not use a msgbox (in general using msgboxs is bad programming practice).
Dim lastValue As Integer
Private Sub Form_Load()
lastValue = 1
Text1.Text = lastValue
End Sub
Private Sub Command1_click()
If Val(Text1.Text) < 1 Or Val(Text1.Text) > 15 Then
Text1.Text = lastValue
Text1.SetFocus
Text1.SelStart = 0
Text1.SelLength = Len(Text1.Text)
Else
lastValue = Text1.Text
End If
End Sub
In this code I check to see if the value of the text is valid, and if is invalid I change it back to the last valid entry and highlight it.