Solved

Unload all MDI.Childs

Posted on 1998-11-30
2
218 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now