2

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
4

2 に答える 2