Discussion Locked

Simple Problems in VB

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
How do u unload all forms under an Mdi form so that there is no active form when the mdi for starts up?

6 replies

by sl-campbell

In the code below you will need the line:
If Not TypeOf frm Is VB.MDIForm
otherwise the MDI form will also get unloaded.

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

If you want tokeep certain forms loaded, the check its' Name property.

This discussion is closed to new replies.