Originally Posted by
6StringJazzer
Dim C As Range
For Each C In Range("A1:BZ500")
If IsDate(C.Value) And C.Value > Date + 7 And C.Interior.Color = RGB(191, 191, 191) Then
repeatingsub
End If
Next C
I tried the following:
Sub test()
Dim C As Range
For Each C In Range("a1:aw250")
If IsDate(C.Value) And C.Value > Date + 7 And C.Interior.Color = RGB(191, 191, 191) Then
Dim testmsg As String
testmsg = ActiveCell.Value
MsgBox testmsg
End If
Next C
End Sub
And it hangs on the same cell (with a date from over a year ago, which does not meet the criteria of being a week or more in the future) , displaying its value in a message box over and over without moving on to the next cell. What am I doing wrong?
Bookmarks