+ Reply to Thread
Results 1 to 4 of 4

Run an entire loop instead of iteration by iteration when stepping into code?

  1. #1
    Registered User
    Join Date
    08-10-2011
    Location
    Cali
    MS-Off Ver
    Excel 365
    Posts
    62

    Run an entire loop instead of iteration by iteration when stepping into code?

    Assuming there is a way to do this that I haven't found yet - how do I run an entire loop rather than having to cycle through each iteration of a loop?

    For example, I have some formatting macros that just run top to bottom on a set of data, 4-500 lines. If it looks something like:

    Please Login or Register  to view this content.
    Then when hitting F8 I would have to cycle 500 times (assuming the For loop had one action within it) to get through the loop. I would like to run "the loop" as a whole and then proceed to the next step, rather than cycling every iteration of the loop - is this possible?

    Thanks,

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,841

    Re: Run an entire loop instead of iteration by iteration when stepping into code?

    You can click in the grey bar on the left of the code window beside the line of code where you want the macro to stop. This will insert a dot to mark that line. When you press the F5 key to run the macro, it will stop at the marked line.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Run an entire loop instead of iteration by iteration when stepping into code?

    Move the cursor to below the Next line and use the Run To Cursor option in the Debug menu.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  4. #4
    Registered User
    Join Date
    08-10-2011
    Location
    Cali
    MS-Off Ver
    Excel 365
    Posts
    62

    Re: Run an entire loop instead of iteration by iteration when stepping into code?

    Thought I had responded to this already but thank you, that fully works for my purposes.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. For Loop Iteration ?
    By distantkitty in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-09-2017, 03:14 PM
  2. [SOLVED] How to move to next iteration of a Do Until loop
    By DannyJ in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-21-2017, 08:10 AM
  3. [SOLVED] My loop is missing last iteration
    By elmnas in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 10-22-2016, 06:46 PM
  4. jump to xth iteration of for next loop
    By ammartino44 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-25-2015, 12:07 PM
  5. [SOLVED] Last Iteration of Loop?
    By saintplay in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-17-2015, 08:19 PM
  6. [SOLVED] Loop fails on 2nd iteration
    By capson in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-14-2014, 01:38 PM
  7. Continue next iteration of For loop
    By Excel_vba in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-22-2013, 02:09 AM

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