I'm creating a Userform and I want the users to closes the userform through the "X" in the corner and by doing that, I want the Excel to close/exit. I tryied the UserForm_Deactivate(), but it's not working or calling the UserForm_Deactivate() when "X" is pressed. Heres the code.
Private Sub UserForm_Deactivate()
Application.Quit
End Sub
I also tryied Workbooks(1).Close and ActiveWorkbook.Close, none worked.
My userform is named by "Organizador", I don't know if it makes any diference since I tryied Organizador_Deactivate() and nothing happened.
Thanks in advance