Unload all MDI.Childs


How do you unload all MDI.Childs but NOT the
application or the MDI.


s_mccolganAsked:
Who is Participating?
 
wizard2072098Connect With a Mentor Commented:
Here's a real simple piece of code that will do it. You can get a lot fancier if necessary.

For i = Forms.Count - 1 To 0 Step -1
     If Forms(i).MDIChild = True Then
        Unload Forms(i)
     End If
Next i

0
 
MirkwoodCommented:
Maybe try the following
Dim f as form
on error resume next
for each f in mdi.childs
      unload f
next
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.