错了
Dim n As Integer = 6 '未来天数,含今天,所以实际是未来7天
Dim dat As Date = Date.Today
Dim dt As Date
If e.Row("农历阳历") = False Then
dt = e.Row("生日")
Else If e.Row("农历阳历") = True Then
dt = e.Row("生日")
Dim ln As New Lunar(dt.Year, dt.Month, dt.Day, False)
dt = ln.SolarDate
End If
Dim dt1 As New Date(Date.Today.Year,dt.Month,dt.Day)
Dim dt2 As New Date(Date.Today.AddDays(n).Year,dt.Month,dt.Day)
If (dt1 > Date.Today AndAlso dt1 < Date.Today.AddDays(n)) OrElse (dt2 > Date.Today AndAlso dt2 < Date.Today.AddDays(n)) Then
e.style = "生日将至"
ElseIf dt = dat Then
e.style = "今天生日"
End If