VBA code a text box for dynamic length

P

pfm721

I have a text box tbConsultNumber. My Company recently decided it wanted to
accept authorization numbers in that spot as well. Consult numbers are 7
characters and Authorization numbers are 9 characters with the following
format 0000000-0. What I want to do is check the data in the text box to make
sure that it matches one of the two requirements and if it doesn't display a
msg box to let the user know to check the number and enter one in the valid
format.

Thanks in advance for any help.
 
Top