-
You could use something like:
[VBA]Private Sub Worksheet_Change(ByVal Target As Range)
Dim rngCheck As Range
Set rngCheck = Range("c5")
If Not Intersect(rngCheck, Target) Is Nothing Then
With rngCheck
If Len(.Value) > 0 Then
If .Value < Date Or Not IsDate(.Value) Then
On Error Resume Next
Application.EnableEvents = False
.ClearContents
.Select
Application.EnableEvents = True
MsgBox .Address(0, 0) & " must be today or later!"
End If
End If
End With
End If
End Sub
[/VBA]
Regards,
Rory
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules