I have found that using the Change event of a TextBox control to validate an entry is quite annoying to a user. Every time a user enters a key stroke into the TextBox the input is validated. It doesn't allow for a user to backspace to correct an error they know they made without being reminded of their mistake.
Most of the VBA applications I write have some sort of dialog with an OK or Apply command button. I only validate their entries when they click on one of those buttons. If you want more of a real-time validation use the Exit event to make them tab out of the text box or click another control prior to doing the validation.
Most of the VBA applications I write have some sort of dialog with an OK or Apply command button. I only validate their entries when they click on one of those buttons. If you want more of a real-time validation use the Exit event to make them tab out of the text box or click another control prior to doing the validation.