28-05-15, 11:38 PM
Dim Text1Text As String
Const Text1Max As Long = 100
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
Text1Text = Text1.Text
End Sub
Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)
If Val(Text1.Text) > Text1Max Then
Text1.Text = Val(Text1Text)
Text1.SelStart = Len(Text1.Text)
End If
End Sub
Const Text1Max As Long = 100
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
Text1Text = Text1.Text
End Sub
Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)
If Val(Text1.Text) > Text1Max Then
Text1.Text = Val(Text1Text)
Text1.SelStart = Len(Text1.Text)
End If
End Sub
