Validate Date
Checks and makes sure that the user enters in a valid date. Make a text box on a form and call it txtDate
Assumes
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.
Rate Validate Date
(3(3 Vote))
sub validDate()
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= ""
Else
txtDate.Text = Format(txtDate.Text, "General Date")
End If
Else
txtDate.Text = Date
End If
end sub
Validate Date Comments
No comments yet — be the first to post one!
Post a Comment