Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ignoring keystrokes

Status
Not open for further replies.
Jan 7, 2005
124
US
I want to ignore certain keystrokes in my application, I have done it before but cannot remember how I did it...I thought it was along the lines of
Code:
Private Sub txtCheckNums_KeyPress(KeyAscii As Integer)
    
    Select Case KeyAscii
        'backspace, delete, 0 to 9, and comma keys
        Case 8, 46, 48 To 57, 188

        'ignore anything else
        Case Else

            'i thought this would ignore the keystroke
            Chr (0)

    End Select

End Sub
Thanks to anyone who helps me out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top