06-02-2023
12:34 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
06-02-2023
12:34 PM
It's possible to make the cancel button work but the problem is that it can't stop the code from running directly.
When the button is clicked an event is fired. The method "OnCancel()" in my blog code handles that event. In the method, I set the variable "UserClickedOnCancel". In the main code, you need to check that variable and if it is set to true then you can stop the method in a controlled way. In my example, I just do this:
If UserWantsToCancel Then Return
It's a bit weird but you might end up with this line of code in lots of places.
Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Blog: hjalte.nl - github.com