Hi,
I have the below code to hide rows based on the date in column "C". What I am trying to do is hide rows older than today's date. It's working but not all rows are being hidden.
Any suggestion?
Thank you in advance.
Windows 7, MS 2010.
I have the below code to hide rows based on the date in column "C". What I am trying to do is hide rows older than today's date. It's working but not all rows are being hidden.
Any suggestion?
Thank you in advance.
Windows 7, MS 2010.
Code:
Private Sub Hidebtn_Click()
Dim myRg As Range
Set myRg = Range([C1].End(xlDown), [C80].End(xlUp))
For Each cell In myRg
If cell.Value >= Now Then
cell.EntireRow.Hidden = True
End If
Next cell
Set myRg = Nothing
End Sub