Pass the value of the combo boxes (I've used cell locations in this example but the principle is the same).
Sub CheckDate()
Dim myDate As Date
On Error Resume Next
sDay = Cells(10, 2).Value
sMon = Cells(10, 3).Value
sYear = Cells(10, 4).Value
myDate = sDay & "/" & sMon & "/" & sYear
If Err = 13 Then
MsgBox "Date is invalid"
Else
MsgBox "Date is valid"
End If
End Sub
|