Jammydan
Board Regular
- Joined
- Feb 15, 2010
- Messages
- 141
Hi
I have the following code, however it seems to stop after removing 1 row, it doesn't check the rest of the range. Can anybody help please?
Many thanks
I have the following code, however it seems to stop after removing 1 row, it doesn't check the rest of the range. Can anybody help please?
Many thanks
Code:
[SIZE=2]
Private Sub Worksheet_Activate()
Dim RemoveOld As Range
Set RemoveOld = Range("C5:C41")
Application.ScreenUpdating = False
ActiveSheet.Unprotect
'**** DELETE OLD CONTRACTS *****
For Each Cell In RemoveOld
If Cell.Value > 0 And Cell.Offset(0, 10) >= 0 Then
Cell.EntireRow.Delete Shift:=xlUp
Application.Run "InsertRowsAndFillFormulas_caller"
End If
Next Cell
ActiveSheet.Protect
Application.ScreenUpdating = True
Range("E3").End(xlDown).Offset(1, 0).Select
End Sub
[/SIZE]