Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to close all active form before load new form

Status
Not open for further replies.

bantakiah

Programmer
Oct 1, 2006
48
ID
i have 10 form which mdi child properties is true.
how to close all active form before open a new form?
 
This may help;

Private Sub Command2_Click()

Dim f As Form
For Each f In Forms()
On Error Resume Next
If f.MDIChild Then Unload f
On Error GoTo 0
Next

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top