📜  VBA 代码示例

📅  最后修改于: 2022-03-11 14:51:54.843000             🧑  作者: Mango

代码示例1
'UserForm2 module

Private Sub UserForm_Activate()
    TextBox1.Text = "Activated"
End Sub

Private Sub UserForm_Deactivate()
    TextBox1.Text = "Deactivated"
End Sub

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

'UserForm1 module

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
    UserForm2.Show
End Sub