This may be a 'cant be done' buy thought I would ask the brain-trust ...
I am trying to figure out a way to intercept when the user clicks on the tab of a form's multi-page so that I can test if there has been a change and, if there has, give the user the option to save BEFORE changing to the next tab. While I can intercept changes to the data, whatever I do I can't get the VbMsgBox to pop up before the page actually changes.
I tried:
but it doesn't reset - presumably because by the time this runs, I am in effect, resetting the new multipage back to the new multipage.![]()
Please Login or Register to view this content.
I am not entirely sure what the syntax is for holding a variable for the 'current' page and swapping back to it if the user wants to cancel but I'm pretty confident I can do that as a plan B.
Effectively there are 3 options:
1. User wants to save changes => run sub to save the data from tab or whole form
2. User does not want to save changes => presumably I just don't run sub that transfers 'new' value to worksheet and reset any changed value on the multipage to value on worksheet
3. User wants to cancel change => swap back to original multipage from new multipage
My question really boils down to, can I ask the question (the VbMsgBox) and process the choice before the multipage changes from original to new? It looks like the act of clicking triggers the change multipage event before anything else gets to chime in. Is it possible to stop this or an easy way to bounce back to the original so, from the user perspective, nothing changed?
Any thoughts on direction for me to try would be appreciated
Bookmarks