Checks and makes sure that the user enters in a valid date. Make a text box on a form and call it txtDate
Original Author: Michael Powers
I made this in a few minutes, after looking for a simple code so that I can make sure that if the user enters in bogus or an incorect form it will either clear it and throw a message or correct it and allow it to pass.
If txtDate.Text <> "" Then
If IsDate(txtDate) = False Then
MsgBox "You have entered an Invalid Date in Last Contacted please use MM/DD/YYYY", , "Invalid Entry"
txtDate.Text = Format(txtDate.Text, "General Date")
txtDate.Text = Date
About this post
Viewed: 64 times
No comments have been added for this post.
You must be logged in to make a comment.