QueryClose Event

It is not possible to remove the "x" from the top right corner although you can disable it.
Whether you display a prompt to the user or not is up to you.
Using the QueryClose event allows you to intercept the message to close the userform before it is actually closed.
If you set the Cancel paramater to True, then the userform will not be closed.
This means the userform has been closed by the user pressing the top right x.


This means the userform has been closed by code


Removing the Close button


© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext