| 
    
     |  | フォーム上でロード、アンロードを繰り返して、帰る場所を見失いそうな気がするので、 こんな感じにしてみたけれど....。
 
 標準モジュール
 Public FLG As Integer
 
 Sub mmdmmd()
 UserForm1.Show
 Do
 If FLG = 1 Then
 UserForm2.Show
 ElseIf FLG = 2 Then
 UserForm1.Show
 End If
 Loop Until FLG = 0
 End Sub
 
 フォーム1
 Private Sub CommandButton1_Click()
 FLG = 1
 Unload Me
 End Sub
 
 Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
 If CloseMode <> vbFormCode Then
 FLG = 0
 End If
 End Sub
 
 フォーム2
 Private Sub CommandButton1_Click()
 FLG = 2
 Unload Me
 End Sub
 
 Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
 If CloseMode <> vbFormCode Then
 FLG = 0
 End If
 End Sub
 
 |  |