sujittalukde
12-13-2007, 02:03 AM
I am using the following code to unload a user form :
Private Sub UserForm_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
If KeyAscii = 27 Then
Unload Me
End If
End Sub
In case the form doesnot contain any control then esc unloads the form but if the user form has some controls esc doesnot unloads the user form.
How this can be done?
Private Sub UserForm_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
If KeyAscii = 27 Then
Unload Me
End If
End Sub
In case the form doesnot contain any control then esc unloads the form but if the user form has some controls esc doesnot unloads the user form.
How this can be done?