Private Sub Form_KeyPress(KeyAscii As Integer)

If KeyAscii = 112 Then ' 112 corrisponde al tasto p
msgbox "Hai premuto P"
end if


end sub

' invece di msg potresti anche cambiare la lettera premuta

Private Sub Form_KeyPress(KeyAscii As Integer)

If KeyAscii = 112 Then ' 112 corrisponde al tasto p
KeyAscii = 97 ' di da A
end if

end sub