I have a user form that is called from inside a sub. I want to stop all code running if the user form is just deactivated. Obviously putting exit sub in the user form deactivate just stops that sub but when it goes back to the calling function it continues to run. Is there a way of ending all code or passing a vaiable back from the form in the parent funtion?