Hello people,
I have written a code that remove last added row, its very simple it counts from down to up my issue is I want the code not be able to delete row 1 and 2.
I did wrote "A3"
but its still possible.
could someone help me ?
Thank you in advance
I have written a code that remove last added row, its very simple it counts from down to up my issue is I want the code not be able to delete row 1 and 2.
I did wrote "A3"
but its still possible.
Code:
Dim lRow As Long
Dim lCol As Long
lRow = Cells.Find(What:="*", _
After:=Range("A3"), _
LookAt:=xlPart, _
LookIn:=xlFormulas, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False).Row
Rows(lRow).ClearContents
could someone help me ?
Thank you in advance