The delete key doesn't have an ascii value. But you can use the KeyDown event insted of the KeyPressed event. It has a KeyCode argument instead of the KeyAscii argument.
There are also simular constants for other keys like:Code:If KeyCode = vbKeyDelete Then 'do whatever End If
vbKeyDown
vbKeyLeft
vbKeyUp
vbKeyRight
vbKeyF1 -> vbKeyF12
vbKeyHome
vbKeyEnd
...and so on
Good luck!




Reply With Quote