ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Validate date entry in a text box. (https://www.excelbanter.com/excel-discussion-misc-queries/196914-validate-date-entry-text-box.html)

GoBow777

Validate date entry in a text box.
 
Hello:

I’m using Excel 2003, and I have a UserForm with a text box that requires a date input, but I’m having difficulty with users making invalid entries.

I’ve posted this question in a different forum and the answer was, “Why not use a calendar control in your UserForm instead”. This is an excellent idea and I plan on doing this but until I’m able to write such a procedure, is there a way to write code that will:

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

Matt


All times are GMT +1. The time now is 04:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com