Hello All,
I tried wanted to have some code that executed when I clicked the Red X on a user form...I used CanceQuery for this. I have other buttons on the form and each of those buttons has the line "Unload Userform ". I am pretty sure that what is happening ,however, is that the CancelQuery code is running when the Unload Userform command is encountered. Is there a way to install some code that will ONLY run if/when I use the red X?
Thank you
I tried wanted to have some code that executed when I clicked the Red X on a user form...I used CanceQuery for this. I have other buttons on the form and each of those buttons has the line "Unload Userform ". I am pretty sure that what is happening ,however, is that the CancelQuery code is running when the Unload Userform command is encountered. Is there a way to install some code that will ONLY run if/when I use the red X?
Thank you