I have the following code to highlight cells within a user defined date range. At present it highlights any cell that meets the criteria. I would like it to highlight the entire row. Does anyone know how to do this?
Sub Auto_Open()
'
'
Dim MyInput As String
Dim MyInput2 As String
MyInput = InputBox("Enter Start of Date Range dd/mm/yyyy", "Start Date")
MyInput2 = InputBox("Enter End of Date Range dd/mm/yyyy", "End Date")
Cells.Select
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, _
Formula1:=MyInput, Formula2:=MyInput2
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent2
.TintAndShade = 0.599963377788629
End With
Selection.FormatConditions(1).StopIfTrue = False
Range("A1").Select
End Sub
Bookmarks