+ Reply to Thread
Results 1 to 3 of 3

Selection not updating after 1st iteration in a For Each loop

  1. #1
    Forum Contributor
    Join Date
    12-15-2009
    Location
    Herndon, VA
    MS-Off Ver
    Excel 2010
    Posts
    163

    Question Selection not updating after 1st iteration in a For Each loop

    The first line of the IF statement appears to be caught in the first iteration of the loop. The selection object doesn't seem to update with each iteration. The other lines do appear to update.

    Is there a problem using the FIND method inside of a FOR EACH loop? I am thinking that the selection object needs to be deactivated somehow before the end of each iteration.

    Any thoughts?



    Please Login or Register  to view this content.

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Selection not updating after 1st iteration in a For Each loop

    Hi Excel_vba
    As far a I can see it does loop but keeps finding the first "TOTAL COSTS"
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,526

    Re: Selection not updating after 1st iteration in a For Each loop

    Not sure what is supposed to happen,
    Try This
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1