Results 1 to 3 of 3

Thread: Solved: Step Backwards through range

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Solved: Step Backwards through range

    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:
    [VBA]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[/VBA]
    Last edited by Bob Phillips; 05-04-2012 at 04:32 PM. Reason: Added VBA tags

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •