Forum Discussion
michaelfaherty19
Oct 24, 2018Copper Contributor
VBA in Excel
Dear Sir/Madam, I have an end user who claims that Excel freezes & crashes when the typical point where it is freezing is when student use an incorrect "(Name)" and get an error message. Th...
erol sinan zorlu
Oct 24, 2018Iron Contributor
where do you make the name check? on change event or on exit event or when you press a button? if you want to control the false inputs from the user it is best to make this control when the related textbox looses focus or when the user press a button. So that you can write a code to eliminate the invalid characters from the name or delete the contents of the textbox and select it for user to enter correct name.
If you are making this control on exit event it is better to exclude some special characters however the code can be a little bit tricky.
- michaelfaherty19Oct 24, 2018Copper Contributor
Thanks Erol, I was reporting someone else's issue, but I will ask them to try your suggestion. Michael.