Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyEscape Then
KeyCode = 0
Cancel = -1
End If
End Sub
Forma aşağıdaki kodu ekle