Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
'使關(guān)閉按鈕失效,用unload語句時closemode=1
If CloseMode <> 1 Then Cancel = True
'Else Application.Quit
End Sub
Private Sub CommandButton1_Click()
CloseMode = 1
Unload Me
End Sub
聯(lián)系客服