I created a UserForm with several functions.
The form opens as I open the Excel file, however if I try to close the form the Excel file close together. Additionally, I can't open the VBA of this Excel (containing the form), so what I do (and that is really dum) it is to open another Excel, press Alt+F11 to open the macro environment and then I can open my Excel file with the UserForm.
I think my problem is in this specific code:
Private Sub UserForm_Terminate()
'Application.Visible = True
ActiveWorkbook.Saved = True
Application.Quit
End Sub
Can anyone guess what is the problem here?
Application.Quit
method is what closes Excel when the UserForm is closed. Remove or comment that line out and try again. Is there anything in particular you want done when the UserForm is closed? - Soulfireunload userform
command instead ofApplication.Quit
which closes excel like it supposed to be. - Dubison