I have three different forms, the main one, and two that are called from it. Each one has the opportunity to have a few different programs open such as notepad or excel, so here is what I did. In each forms .FormClosed routine, I placed a call to a sub called closeEverything(). CloseEverything() is in my module, so it can be accessed from anywhere. My thought was since any form can have several programs open, then use the closeEverything() sub to determine if the program is running, and if so, close it. Now, the problem is that when I click the 'X' at the top right corner of the two child forms, I have to click the stop debug button on VB. I had thought of using owner as part of a solution, but I have never attempted to write code to close multiple forms. That being said, what is the best way to accomplish this?
↧