Hi,
The problem with a textbox in a userform is as follows:
1. The textbox represents an application number (no set number of characters) e.g. 12345678
2. The textbox can only accept a "numeric only" value; however
3. When the application is approved, the textbox can also accept an uppercase T as a prefix e.g. T12345678
From my limited knowledge I believe I need to use something along the lines of either:
a) Asc(Left(textbox, 1)) to extract the first character and check with an IF or CASE statement that it is either a number using Ascii or IsNumeric, or contains the letter "T" i.e. Ascii(84)
If the first character is a letter other than an uppercase T or the remaining characters position 2 to N are not numeric should flag an error message.
b) A checkbox when ticked would place an uppercase T into the textbox first character position however I would still need to check correct characters make up the rest of the application number.
Would this be better handled on Exit or KeyPress?
Any assistance would be great as to incorporating the "T" into a starting numeric only field. Thank you.
Bookmarks