by Mark S (1 Submission)
Category: String Manipulation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 3rd August 2007
Date Added: Mon 8th February 2021
Rating: (1 Votes)
To handle input into a textbox for date
As System.Windows.Forms.KeyPressEventArgs) Handles txtboxDate.KeyPress
'KeyPress input controlled by ASCII. Do nothing
'if these Ascii Ranges are keypress
Select Case e.KeyChar()
Case ChrW(0) To ChrW(7) 'Null to Audible bell
e.KeyChar = Nothing
Case ChrW(9) To ChrW(46) 'Horizontal Tab to Period.
e.KeyChar = Nothing
Case ChrW(58) To ChrW(255) 'Semicolen to Empty Square
e.KeyChar = Nothing
End Select