Code:TodayPlus30 = Date + 30 Pwd = "pwd" With ThisWorkbook.Worksheets("Vertical") .Unprotect Password:=Pwd .Cells.Locked = False For Each cll In .Range("$A$19:$A$448").Cells If cll.Value > TodayPlus30 Then cll.EntireRow.Locked = True 'to allow only rows within the defined range to be selected Next cll .Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:=Pwd, userinterfaceonly:=True End With
Bookmarks