validation macros


Posted by Pete Grenfell on January 16, 2001 2:15 AM

I need a macro to analyse a list of dates in a worksheet and then display a MsgBox if the date is a certain amount of time (e.g. 60days) from the current date.

I'm absolutely stuck at the moment!
Any ideas?



Posted by Dave Hawley on January 17, 2001 2:30 AM

Hi Pete

Try this one.

Sub CheckDates()
Dim cell As Range

For Each cell In Range("A1:A100")
If IsDate(cell) Then
If cell >= Date + 60 Then
MsgBox cell.Address & " is one!"
End If
End If
Next cell

End Sub


If any probs just e-mail me.

Dave


OzGrid Business Applications