更新时间:2023-12-06 11:28:28
例如,您可以将下面的宏添加到 UserForms 代码模块中:
For example, you can add the macro below to the UserForms code module:
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
Cancel = True
MsgBox "You can't close the dialog like this!"
End If
End Sub