Hi
strVal is not an object so won't have properties like 'NumberFormat'. Perhaps you could use this instead:
Sub DateFormatChecking(intColNumber As Integer, strSht As String)
Dim r As Range
With Worksheets(strSht)
For Each r In .Range(.Cells(1, intColNumber), .Cells(Rows.Count, intColNumber).End(xlUp))
If Not IsEmpty(r.Value) Then
If Not (r.NumberFormat = "mm/dd/yy" Or r.NumberFormat = "mm/dd/yyyy") Then _
r.Interior.ColorIndex = 7
End If
Next r
End With
End Sub
and call it from within code like:
DateFormatChecking 6, "Sheet5"
Richard