by Suhas B M (1 Submission)
Category: Encryption
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 18th June 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)
TO RESTRICT A TEXTBOX FOR ALPHABETS(validation)
'U NEED A FORM and a textbox(text1) for this code to run
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode >= 65 And KeyCode <= 90 Or KeyCode = 8 Or KeyCode = 32 Then
Text1.Locked = False 'keycode=32 for space,8 for backspace
Else
Text1.Locked = True
End If
End Sub