Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Closing all MDI child forms

Status
Not open for further replies.

netcashin

Programmer
Nov 13, 2000
159
US
Ok this is probably a simple answer. First time working with MDI forms.

How can I close all child forms within a MDI form?

Thanks in advance
 
Hi,

Close the MDI form and all the child forms will be automatically closed.

Regards. Pierre
Montreal,Quebec,Canada
 
I should of put more information.

I wish to close the child froms without closing the parent form.


 
Try this:

Dim frm As Form
For Each frm In Forms
If Not TypeOf frm Is MDIForm Then
If frm.MDIChild Then
Unload frm
End If
End If
Next

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top