How to go back or re-display Userform after hiding it?

前端 未结 2 823
悲&欢浪女
悲&欢浪女 2021-01-22 22:14

I have this code in one command button in UserForm2:

 Private Sub CButton1_Click()
     UserForm1.Show
     Me.Hide
 End Sub

Now, Userfor

2条回答
  •  鱼传尺愫
    2021-01-22 22:34

    Change to this:

    Private Sub CButton1_Click()
       Me.Hide
       UserForm1.Show
       Unload Me
    End Sub
    
    Private Sub CButton2_Click()
       Me.Hide
       UserForm2.Show
       Unload Me
    End Sub
    

提交回复
热议问题