private sub CloseAllForms() For Each ChildForm As Form In Me.MdiChildren ChildForm.Close() Next end sub