Private Sub RegistrationDate_LostFocus()
Dim dd As Integer
Dim mmm As Integer
Dim yyyy As Integer
dd = CInt(Left(tbx_date, InStr(1, tbx_date, "/") - 1))
mmm = CInt(Mid(tbx_date, InStr(1, tbx_date, "/") + 1))
yyyy = CInt(Mid(tbx_date, InStrRev(tbx_date, "/") + 1))
RegistrationDate = DateValue(dd & " " & MonthName(mmm) & ", " & yyyy)
End Sub
|