How to Ignore Specific Characters in TextBox
Posted on January 5, 2009
1 2 3 4 5 6 7 8 9 10 11 12 | 'Controls - How to Ignore Specific Characters in TextBox Option Explicit 'Add a TextBox to your Form. Private Sub Text1_KeyPress(KeyAscii As Integer) Dim sTemp As String 'To ignore characters !@#$%^&*()_+= sTemp = "!@#$%^&*()_+=" If InStr(1, sTemp, chr ( KeyAscii)) > 0 Then KeyAscii = 0 End Sub |