Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Function checkDate(aCtrl As TextBox) As Date
- Dim aDate As Date
- While Date.TryParse(aCtrl.Text, aDate) = False
- If Date.TryParse(InputBox("Please re-enter date. Entry has to be a valid date", "Error"), aDate) = True Then
- aCtrl.Text = aDate
- Else
- aCtrl.Text = ""
- End If
- End While
- Return aDate
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement