1 of 1 people found this helpful
It depends on how the script is triggered. If by a trigger event, try exiting the script with a result of 0 or False to cancel the originating event (eg OnLastWindowClose).
Not to state the obvious, but also double-check the button assignment. I made it a habit to add a comment line after each custom dialog (with multiple buttons) to describe the order and text of the buttons.
Yes, it is triggered by OnLastWindowClose.
I'll try changing the script result as suggested.
It was. Exit Application should have been inside the If/EndIf:
If – cancel button