Ah ha, an interesting situation -- this assumes that the form you want to do this from is in fact within an MDIform. Normal forms can't act as a container towards other forms unless setting the MDIParent property. They also require the parent to have the property 'IsMDIContainer' set to true on the parent.
The following snippet of code should be placed in a procedure somewhere in your code to do what you require.
If Not Me.MdiChildren Is Nothing Then Dim _pointertoForm As System.Windows.Forms.Form For Each _pointertoForm In Me.MdiChildren x.Close() Next End If
Hope that sorts out your little problem.
This was first published in March 2003