Wil Moosa
Well-known Member
- Joined
- Aug 11, 2002
- Messages
- 893
Good to be back...
I have the following code that works well for my needs. How can I adjust it in that way it searches for all past dates ánd all the dates from now up to fifeen days? Thank you.
Sub DueDateCheck()
Dim FindString As Date
Dim Rng As Range
FindString = CLng(Date)
With Sheets("Teamsamenstelling").Range("AA6:A131")
Set Rng = .Find(What:=FindString, _
After:=.Cells(.Cells.Count), _
LookIn:=xlFormulas, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not Rng Is Nothing Then
Worksheets("Teamsamenstelling").Activate
MsgBox "There are one of more dates due"
Else
Worksheets("Monitor").Activate
MsgBox "Nothing found"
End If
End With
End Sub
I have the following code that works well for my needs. How can I adjust it in that way it searches for all past dates ánd all the dates from now up to fifeen days? Thank you.
Sub DueDateCheck()
Dim FindString As Date
Dim Rng As Range
FindString = CLng(Date)
With Sheets("Teamsamenstelling").Range("AA6:A131")
Set Rng = .Find(What:=FindString, _
After:=.Cells(.Cells.Count), _
LookIn:=xlFormulas, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not Rng Is Nothing Then
Worksheets("Teamsamenstelling").Activate
MsgBox "There are one of more dates due"
Else
Worksheets("Monitor").Activate
MsgBox "Nothing found"
End If
End With
End Sub