CodePudding user response:
'FormA
'put a CommandButton
Option Explicit
Private Sub Command1_Click ()
Me. Hide
FormB. Show vbModal
Me. Show
End Sub
CodePudding user response:
This is easy,Reference:
Option Explicit
'" A form of "code:
Private Sub Command1_Click ()
Unload Me 'if there is not anything "variable" in A form that can be "uninstall the form"
'if you have any input on A form, or A different "choice" project needs to retain,
'then you cannot Unload, only "hidden window", use: Me. Hide
Form2. Show
End Sub
Option Explicit
'" form B "code:
Private Sub Form_Unload (Cancel As Integer)
Form1. Show 'shows A form
End Sub
CodePudding user response:
Upstairs friend, why I tried it in the way you not lineCodePudding user response:
I'm B form closed on display A form at the same time, but now does not displayCodePudding user response:
You check whether correct the use of "my code,Second, is the form of the corresponding problem, I here Form1 is assumed as A form, Form2 assumption for B form,
If the "required to do", is certainly no problem,