Mário Nunes

KeyDown (ESC) for exit

Discussion created by Mário Nunes on Feb 2, 2021

Does anyone know why this command doesn't work?

 

Sub UserForm_KeyDown(ByVal KeyAscii As MSForms.ReturnInteger, ByVal Shift As Integer)
Select Case KeyAscii
Case 13 'enter key
addBtn_Click
'ase 39 'right arrow
skipBtn_Click
Case 27 'escape key
Unload Me
Case Else
End Select
End Sub

 

 

thank

Outcomes