conditional formatting ?

F

felix

i have a simple text box - txtdate, with condition if weekmane(txtdate) = vbsunday change its forecolor to red.
it works sometime but not every time, please help !!
 
F

fredg

i have a simple text box - txtdate, with condition if
weekmane(txtdate) = vbsunday change its forecolor to red. it
works sometime but not every time, please help !!

Sorry, I never heard of the weekname() function.

How about: If WeekDay([txtDate] = 1 Then
[txtDate].Forecolor = vbRed
Else
[txtDate].Forecolor = vbBlack
End If
 
Top