Try This !
Sub sUnloadChild()
Dim intIndex As Integer
Dim blnLoop As Boolean
blnLoop = True
Do While blnLoop
'Forms is a collection of loaded form in your App
'Index 0 is MDIfrom
For intIndex = 1 To Forms.Count - 1
If Forms(intIndex).MDIChild = True Then
Unload Forms(intIndex)
blnLoop = True
Exit For
End If
blnLoop = False
Next
'Only MDI from is open
If Forms.Count = 1 Then blnLoop = False
Loop
End Sub
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only