Hi Holger,
Good morning!
Sorry! Today I'm facing a problem in the code 'run-time error 13 time mismatch' on the following line.
Option Explicit
Sub ColorBirthdays()
Dim myCel As Range
Range("A1:AE" & Rows.Count).Interior.Color = xlNone 'clear any color
For Each myCel In Range("T1:T" & Range("T" & Rows.Count).End(xlUp).Row).SpecialCells(xlCellTypeConstants, 23)
With myCel
If Date = DateSerial(Year(Date), month(.Value), Day(.Value)) Then
Range("B" & .Row, "AE" & .Row).Interior.Color = vbGreen
End If
End With
Next myCel
MsgBox "Done!", 64
End Sub
The error is in the line:
If Date = DateSerial(Year(Date), month(.Value), Day(.Value)) Then
Sorry for trouble again.
Thank you.
(The problem is related to this thread so I posted it here though the thread is solved and didn't start a new thread. Sorry for it.)
Regards,
Mukesh
Bookmarks