Hi people. I've been writing a little application and I want the user to be able to exit a form by pressing ESC key. I have tried a this so far but no joy:
Private Sub frmMenu_KeyPress(KeyAscii As Integer)
If KeyAscii = 27 Then
KeyAscii = 0
End
End If
End Sub
I have tried a few different things but can't seem to get it to work. Any help would be appreciated. Thanks in advance