?
Solved

Unload all MDI.Childs

Posted on 1998-11-30
2
Medium Priority
?
225 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 100 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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
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…
Suggested Courses
Course of the Month13 days, 13 hours left to enroll

801 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