View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Janis Janis is offline
external usenet poster
 
Posts: 360
Default while deleting rows it finds an error - error trapping

Okay, my code seems to be working but it stops after deleting the first two
rows.
It must find an error then return to 0 but what is the error? The only
thing I see is there are two cells together in column M that are blank.
There are a whold bunch more. HOw do I trap for the error so this script
will finish.
thanks, sorry for the multiple posts.
-----------code------
Sub DeleteRowsBlankMColumns()
With ActiveSheet
On Error Resume Next
.Columns("M").SpecialCells(xlCellTypeBlanks).Entir eRow.Delete
On Error GoTo 0
End With
End Sub