1: Private Sub MDIForm_Unload(Cancel As Integer) 2: Dim fm As Form 3: 4: ' すべてのフォームをアンロードする 5: For Each fm In Forms 6: Unload fm 7: Next 8: End Sub