When I close Form2, Form1 is still running in the background and the debugging does not stop. I have a button in Form1 that opens Form2 and makes Form1 unvisible.
Is there a simple solution to shut Form1 down whenever I close Form2 and then make the whole program close? (without any button in Form2)
You call
Application.Quitwhen closing Form2. If you are using a UserForm:If you are using an Access form:
Note that
Application.Quitwill really quit the application. If you just want to close the form, useUnload Form1instead (also, called within one of these blocks of code).