Insira este código dentro o Userform e ao teclar ESC o formulário será fechado.
Private Sub UserForm_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
If KeyAscii = 27 Then
Unload Me
End If
End Sub
Postado por Bethoven Marcadores: Códigos VBA
Insira este código dentro o Userform e ao teclar ESC o formulário será fechado.
Private Sub UserForm_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
If KeyAscii = 27 Then
Unload Me
End If
End Sub
Administrator by Bethoven Amora and Luís Fernando