Her's an example of how one function can check the daters of all date TextBoxes.
Private Sub txtweekc_Exit(ByVal Cancel As MSForms.ReturnBoolean)
'Sample Date TextBox Exit Event Sub
Dim CancelMe As Boolean
With txtweekc
.Text = CheckDate(.Text, CancelMe)
End With
Cancel = CancelMe
End Sub
Private Function CheckDate(ByVal DateString As String, ByRef CancelMe As Boolean) As String
'Check date format of DateString, Set CancelMe in Calling Sub
'Returns formatted date if input DateString is good, else returns Empty String
If IsDate(DateString) Then 'Format as desired.
CheckDate = CStr(Format(CDate(DateString), "dd/mm/yyyy"))
Else
CheckDate = ""
MsgBox "Please enter a valid date."
CancelMe = True
Exit Function
End If
'Test for date in correct range
If CDate(CheckDate) < Now - 30 Or CDate(CheckDate) > Now Then 'Between 30 days ago and today
CheckDate = ""
MsgBox "Please enter an allowed date."
CancelMe = True
End If
End Function