Validating text

They are harder to understand but offer better performance. Which is easier if you don't know regex but is less performant.

I do use this on the Text Changed event, because I don't want the user to continue typing if it's an invalid character; the rule checking "eats" the invalid character. Valid = True End If Else Select Case m Check Type Case Check String If m Input Mask. Valid = True End If Case Else '// right now we're only testing for numbers...

Create a drop down list of items in a cell, with Excel's Data Validation feature.

This will make data entry easier, and reduce input errors and typing mistakes.

Unfortunately, the text I have copied includes something else, too, e.g.

“ The fastest way for validation is using regular expressions.

Leave a Reply