You can look up the ASCII codes on line like here for example but it's just easier to use Debug.Print as in the following code to find out what they are. If you press Escape and Return you will see in the Immediate window that they have codes 27 and 13. For the KeyPress event to fire Key Preview needs to be set to Yes. It's way down at the bottom of the Form Properties Event tab.
Code:
Private Sub Form_KeyPress(KeyAscii As Integer)
Debug.Print KeyAscii
If KeyAscii = 27 Then
MsgBox "Escape was pressed"
End If
If KeyAscii = 13 Then
MsgBox "Enter was pressed"
End If
End Sub