plawrenz
05-04-2012, 01:02 PM
I am trying to step backwards through a range since I am trying to delete rows. Here is my code. i just need it to start at A150 and go through A7. In fact it would be better if the end of the range could be dynamic. Thanks for the help:
With ListBox1
For i = 0 To .ListCount - 1
If .Selected(i) Then
Set r1 = Range("A7:A150")
For Each c1 In r1
If c1.Value = .List(i) Then
c1.Font.Bold = True
With c1
c1.EntireRow.Delete
End With
End If
Next c1
End If
Next i
End With
With ListBox1
For i = 0 To .ListCount - 1
If .Selected(i) Then
Set r1 = Range("A7:A150")
For Each c1 In r1
If c1.Value = .List(i) Then
c1.Font.Bold = True
With c1
c1.EntireRow.Delete
End With
End If
Next c1
End If
Next i
End With