SeanJ
05-19-2008, 09:51 AM
Is there a way to validate a testbox instead of using the following code.
Private Sub txtFlight_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If Shift = 2 Then
If KeyCode = 86 Then KeyCode = 0
End If
End Sub
Private Sub txtFlight_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 48 To 57
Case 65 To 90
Case 97 To 122
Case Else
KeyAscii = 0
End Select
End Sub
Private Sub txtFlight_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If Shift = 2 Then
If KeyCode = 86 Then KeyCode = 0
End If
End Sub
Private Sub txtFlight_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 48 To 57
Case 65 To 90
Case 97 To 122
Case Else
KeyAscii = 0
End Select
End Sub