L
LiAD
Hi,
I was given this code on the forum, (cant find my old post), which works
fine, deleting the grey coloured cells, however once it has deleted the lines
I need it errors on this line
Range("L3:L" & Rows.Count).Find("", SearchFormat:=True).EntireRow.delete
with Run time error 91, object variable or with block variable not set.
The same error appears if there are no grey cells to delete. Am I missing
something from this code?
Thanks
LiAD
Application.FindFormat.Interior.ColorIndex = 15
On Error GoTo Done
Do
Range("L3:L" & Rows.Count).Find("", SearchFormat:=True).EntireRow.delete
xlShiftUp
Loop
Done:
I was given this code on the forum, (cant find my old post), which works
fine, deleting the grey coloured cells, however once it has deleted the lines
I need it errors on this line
Range("L3:L" & Rows.Count).Find("", SearchFormat:=True).EntireRow.delete
with Run time error 91, object variable or with block variable not set.
The same error appears if there are no grey cells to delete. Am I missing
something from this code?
Thanks
LiAD
Application.FindFormat.Interior.ColorIndex = 15
On Error GoTo Done
Do
Range("L3:L" & Rows.Count).Find("", SearchFormat:=True).EntireRow.delete
xlShiftUp
Loop
Done: