View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default Can't get the logic right

If TB is a valid date,try this

Sub dateit()
If [TB] = Date And [TB] < Date + 365 Then MsgBox "Hi"
End Sub


--
Don Guillett
SalesAid Software

"Mr. Clean" wrote in message
om...
I have this code:

If ((DateValue(TB)) = Now()) And _
((DateValue(TB) + 365) <= ((Now()) + 365)) Then
.
.
End If


And it isn't getting me only the values of TB that are within one year
of today's date. What do I need to change to get that?