多谢楼上,自定义样式我找到了,也会弄了
不过关于函数方面还是希望能请教一下
我希望我在某列输入一个时间,当系统时间与输入的时间差距超过11个月时,输入的日期字体标红提醒,如能弹出窗口提醒更佳
CZY版主帮我写了2个代码,第二个我是理解了,不过计算的是年差距,与我的使用需求相差关键的一个月
第一个代码我也不是很理解,在此都贴上,希望有高手指点一二
-----------------------------------------------------------
If e.Col.IsDate AndAlso e.Col.Name = "日期" Then
If e.Row.IsNull(e.Col.Name) = False
If e.Row("是否处理") = False Then
If e.Row(e.Col.Name).AddDays(30) < Date.Today() Then
e.Style = "样式1"
End If
End If
End If
End If
--------------------------------------------------
If e.Col.IsDate AndAlso e.Col.Name = "最近保险日期" Then
If e.Row.IsNull(e.Col.Name) = False
If e.Row(e.Col.Name).AddYears(1) < Date.Today() Then
e.Style = "保险提示"
End If
End If
End If
If e.Col.IsDate AndAlso e.Col.Name = "最近年检日期" Then
If e.Row.IsNull(e.Col.Name) = False
If e.Row(e.Col.Name).AddYears(1) < Date.Today() Then
e.Style = "年检提示"
End If
End If
End If
-------------------------------------------------
望高手不吝赐教,万分感激!