You can use the string function Left, Mid and Right to extract parts of a
string, and you can use InStr to determine where the slashes are.
For instance, code like:
Function IsMMDDYYYYDate(InputString As String) As Boolean
Dim booFlag As Boolean
Dim intFirstSlash
Dim intSecondSlash
Dim strMM
Dim strDD
Dim strYYYY
booFlag = False
If Len(InputString) = 10 Then
intFirstSlash = InStr(InputString, "/")
If intFirstSlash > 0 Then
intSecondSlash = InStr(intFirstSlash + 1, InputString, "/")
If intSecondSlash > 0 Then
strMM = Left$(InputString, intFirstSlash - 1)
strDD = Mid$(InputString, intFirstSlash + 1, _
IntSecondSlash - intFirstSlash - 1)
strYYYY = Mid$(InputString, intSecondSlash + 1)
booFlag = (Format(DateSerial(CLng(strYYYY), _
CLng(strMM), CLng(strDD), _
"mm\/dd\/yyyy") = InputString)
End If
End If
End If
IsMMDDYYYYDate = booFlag
End Function