is there a way to close all MDIChild forms without keeping track of the ones the user has open, leaving just the MDIParent form open?
Printable View
is there a way to close all MDIChild forms without keeping track of the ones the user has open, leaving just the MDIParent form open?
Try something like this:
While not me.ActiveMDIChild is nothing
me.activemdiChild.Close
Loop
or something like this....
If you are not closing them from the parent window you will have to do something like this...Code:Dim frm As Form
For Each frm In Me.MdiChildren
frm.Close()
Next
/LeyanCode:Dim frm As Form
For Each frm In Me.ParentForm.MdiChildren
frm.Close()
Next