J
Janis
I tried putting "ands" in between the lines to connect them between the if
and end if.
The compiler stops on the delete line.
I need all three statements to work if there is a date on the first line.
Else exit sub.
thanks,
Sub deleteDateRow1()
Dim FrReptDate As Date
Dim ToReptDate As Date
Dim Rng As Range
Rng = Range("A1")
If Rng.Value.Date Then FrReptDate = Rng.Value And ToReptDate = Rng.Offset(0,
1).Value
and Rng.EntireRow.Delete Shift:=xlUp
Debug.Print FrReptDate, ToReptDate
End If
Exit Sub
End Sub
and end if.
The compiler stops on the delete line.
I need all three statements to work if there is a date on the first line.
Else exit sub.
thanks,
Sub deleteDateRow1()
Dim FrReptDate As Date
Dim ToReptDate As Date
Dim Rng As Range
Rng = Range("A1")
If Rng.Value.Date Then FrReptDate = Rng.Value And ToReptDate = Rng.Offset(0,
1).Value
and Rng.EntireRow.Delete Shift:=xlUp
Debug.Print FrReptDate, ToReptDate
End If
Exit Sub
End Sub