在 Sub DateDiff 中实现 Sub TabPaint 时出现错误
Public Sub TabPaint(ss As Integer, cc As Integer)
With Sheets(ss).Tab
.Color = cc
.TintAndShade = 0
End With
End Sub
Public Sub DateDiff(date1 As String, date2 As String, shn As Integer)
If DateDiff("d", date1, date2, vbMonday, vbFirstJan1) < 0 Then
TabPaint (shn, 255)
Else
TabPaint(shn,5287936)
End If
End Sub