Hey All...
I am trying to run a simple For loop, but I keep getting an error, with no clue why. Could someone shine the light on this code for me??
Thanks
MY ERROR MESSAGE:
Run-time error '438'
Object doesn't support this property or method
The code errors out on the .Delete Shift:=xlUp line.
I am trying to run a simple For loop, but I keep getting an error, with no clue why. Could someone shine the light on this code for me??
Thanks
MY ERROR MESSAGE:
Run-time error '438'
Object doesn't support this property or method
The code errors out on the .Delete Shift:=xlUp line.
Code:
rCount = PolicyD.Sheets(1).Range("O1").Value
Dim i As Integer
For i = 2 To rCount
If Sheets(1).Cells(i, 3) = Sheets(1).Cells(i - 1, 3) Then
Sheets(1).EntireRow("i").Delete Shift:=xlUp
rCount = rCount - 1
End If
Next i