Hello:

I’m using Excel 2003 and I have a UserForm which works just the way it should, no problems, except for a text box which is meant for the user to enter a date. Now I know that validation has a lot to do with formatting and normally this wouldn’t be a problem accept that I suck at VBA and also everybody else has their own idea of what a date should look like, even with a label placed right next to the text box that shows the user how to enter the date “mm/dd/yyyy”, but apparently not every one understands what this means.

My questions are these; how can I write my code to:

1. Validate the entry is a date.
2. Validate the entry is not greater then today’s date.

The last question is mostly for aesthetics. I’ve seen this done before but I just don’t know that I’ve seen it done with Excel, so this would be really cool if any one is able to do it.

3. Auto fill text box with the correct date format (mm/dd/yyyy) based on users entries. In other words, when the user begins to type and enters the number 72, the text box would automatically recognize this as neither a month or a day and change it to look like this, “07/02/”. The completed date entry for typing in the next five numbers (92008) would look like this, “07/29/2008”.

Any help would be greatly appreciated.

Matt