tatebn
05-05-2009, 01:33 PM
I'm using a macro to delete empty cells and shift cells left.
Range(Range("A2"), Range("A2").End(xlDown)).EntireRow.SpecialCells(xlCellTypeBlanks).Delete Shift:=xlToLeft
I have it working except that if the file in question has no blank cells it crashes. I tried putting
On Error Resume Next
afterward. Which worked for one file containing the macro but not on another.
How do I fix this?
Range(Range("A2"), Range("A2").End(xlDown)).EntireRow.SpecialCells(xlCellTypeBlanks).Delete Shift:=xlToLeft
I have it working except that if the file in question has no blank cells it crashes. I tried putting
On Error Resume Next
afterward. Which worked for one file containing the macro but not on another.
How do I fix this?