User form input date only




Private Sub cboReportingDate_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)

Dim dtTmp As Date
Cancel = False
On Error GoTo err_baddate
dtTmp = CDate(Me.cboReportingDate)
Me.cboReportingDate = dtTmp
On Error GoTo 0
sub_ex:
Exit Sub
err_baddate:
MsgBox "Please Enter a Valid Date.", vbOKOnly + vbExclamation
Cancel = True
Resume sub_ex

End Sub