Intercept the Close button (X) in the title bar of a user form
Article contributed by Bill Coan
Place the following code into the user form's QueryClose event.
Private Sub
UserForm_QueryClose(Cancel
As Integer, CloseMode As
Integer)
If CloseMode =
vbFormControlMenu
Then Cancel = True
End Sub
Disabling the Close Button