Sub 测试借阅提醒() Select Case Month(Date) Case 2 If Year(Now()) / 4 = Int(Year(Now())) Then If Day(Now()) - Day([b2]) < 0 Then If Day(Now()) + 29 - Day([b2]) > 10 Then i = Day(Now()) + 29 - Day([b2]) MsgBox "今天是 " & Year(Now()) & "年" & Month(Date) & "月" & Day(Date) & "日" & ",您借阅了第 " & i & " 天," & "按规定,你已经超了" & i - 10 & " 天......", , "友情提示" Else End If Else If Day(Now()) - Day([b2]) > 10 Then i = Day(Now()) - Day([b2]) MsgBox "今天是 " & Year(Now()) & "年" & Month(Date) & "月" & Day(Date) & "日" & ",您借阅了第 " & i & " 天," & "按规定,你已经超了" & i - 10 & " 天......", , "友情提示" Else End If End If Else If Day(Now()) - Day([b2]) < 0 Then If Day(Now()) + 28 - Day([b2]) > 10 Then i = Day(Now()) + 28 - Day([b2]) MsgBox "今天是 " & Year(Now()) & "年" & Month(Date) & "月" & Day(Date) & "日" & ",您借阅了第 " & i & " 天," & "按规定,你已经超了" & i - 10 & " 天......", , "友情提示" Else End If Else If Day(Now()) - Day([b2]) > 10 Then i = Day(Now()) - Day([b2]) MsgBox "今天是 " & Year(Now()) & "年" & Month(Date) & "月" & Day(Date) & "日" & ",您借阅了第 " & i & " 天," & "按规定,你已经超了" & i - 10 & " 天......", , "友情提示" Else End If End If End If Case 1, 3, 5, 7, 8, 10, 12 If Day(Now()) - Day([b2]) < 0 Then If Day(Now()) + 31 - Day([b2]) > 10 Then i = Day(Now()) + 31 - Day([b2]) MsgBox "今天是 " & Year(Now()) & "年" & Month(Date) & "月" & Day(Date) & "日" & ",您借阅了第 " & i & " 天," & "按规定,你已经超了" & i - 10 & " 天......", , "友情提示" End If Else If Day(Now()) - Day([b2]) > 10 Then i = Day(Now()) - Day([b2]) MsgBox "今天是 " & Year(Now()) & "年" & Month(Date) & "月" & Day(Date) & "日" & ",您借阅了第 " & i & " 天," & "按规定,你已经超了" & i - 10 & " 天......", , "友情提示" End If End If Case 4, 6, 9, 11 If Day(Now()) - Day([b2]) < 0 Then If Day(Now()) + 30 - Day([b2]) > 10 Then i = Day(Now()) + 30 - Day([b2]) MsgBox "今天是 " & Year(Now()) & "年" & Month(Date) & "月" & Day(Date) & "日" & ",您借阅了第 " & i & " 天," & "按规定,你已经超了" & i - 10 & " 天......", , "友情提示" End If Else If Day(Now()) - Day([b2]) > 10 Then i = Day(Now()) - Day([b2]) MsgBox "今天是 " & Year(Now()) & "年" & Month(Date) & "月" & Day(Date) & "日" & ",您借阅了第 " & i & " 天," & "按规定,你已经超了" & i - 10 & " 天......", , "友情提示" End If End If End Select End Sub
|