Hi Strongm,
why is that?
I don't know the project that KGB007 is working with, but if that project uses txtDateBox in many forms, perhaps the better solution is to build an ActiveX control to deal with dates (by the way KGB007, why don't you use a control like DTPicker - Microsoft Windows Common Controls-2 6.0?).
For prevent the user to write more that two "/", there's no need for regular expressions, but if we want to control all the writing, like control that the user only write 2 digits, then a "/", then more two digits, another "/" and the two final digits, regular expressions are a good choice.
If we use a regular expression on the Change event, we can control the sequence of the writing, and using another regular expression for the final date format, we can grant that only a valid date is written in the control.
Clearly that it isn't the only way to do it, but my point is to give others the chance to know that regular expressions do the job. May be that's because the first time I heard about regular expressions, I had no idea of its capacities not even a common use for them. Now where's a valid example for using regular expressions.
May be you can e-mail me or post in the forum, others uses for regular expressions, at least I will appreciate it. regards,
Bruno Loureiro.