I have a UserForm with a number of textbooks plus OK and CANCEL buttons. One Textbox (for Age) gets validated in the Age_Exit Sub. If no age is entered, or if too high, then a MsgBox is displayed showing the error, Cancel is set True and the sub exited. This returns focus to the Age TextBox for the user to enter a valid age. My problem is that until the user has entered a valid Age then clicking on the CANCEL button has no effect, focus stays on the Age textbox.
I have tried using _BeforeUpdate but this does not solve the problem.
Is it possible to get round this other than by telling the user to enter a valid age then click on CANCEL?
Thanks for any ideas.
I have tried using _BeforeUpdate but this does not solve the problem.
Is it possible to get round this other than by telling the user to enter a valid age then click on CANCEL?
Thanks for any ideas.