Solved

Unload all MDI.Childs

Posted on 1998-11-30
2
222 Views
Last Modified: 2010-05-03

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


0
Comment
Question by:s_mccolgan
2 Comments
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1447448
Maybe try the following
Dim f as form
on error resume next
for each f in mdi.childs
      unload f
next
0
 
LVL 1

Accepted Solution

by:
wizard2072098 earned 50 total points
ID: 1447449
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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question