+ Reply to Thread
Results 1 to 8 of 8

Loop prevents debugging

  1. #1
    Forum Contributor
    Join Date
    08-04-2013
    Location
    Bucharest
    MS-Off Ver
    Office Professional Plus 2019
    Posts
    303

    Loop prevents debugging

    Hi, this is probably just me being bad at VBA, but I'm getting frustrated trying to debug a macro. Pressing F8 to take it step by step never reaches the part where I think the problem is, because in between there is a loop that will never end no matter how many times I press F8. Any ideas as to how I can solve this? TIA.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Loop prevents debugging

    You must post the code.
    Ben Van Johnson

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Loop prevents debugging

    What kind of a loop is? Is do while or do until?

  4. #4
    Forum Contributor
    Join Date
    08-04-2013
    Location
    Bucharest
    MS-Off Ver
    Office Professional Plus 2019
    Posts
    303

    Re: Loop prevents debugging

    Sorry, here it is:
    Please Login or Register  to view this content.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Loop prevents debugging

    Where is the problem?
    If posting code please use code tags, see here.

  6. #6
    Forum Contributor
    Join Date
    08-04-2013
    Location
    Bucharest
    MS-Off Ver
    Office Professional Plus 2019
    Posts
    303

    Re: Loop prevents debugging

    There is another "main" macro that calls this macro. I think I can solve the problem on my own, but I can't get to it because the loop in this macro never ends. I thought it would end because "r" is only 50 rows long, so it should end eventually, but it doesn't, unless I press F5.

  7. #7
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Loop prevents debugging

    At the left side of the code pane there will be an execution point arrow when you are stepping through the code. You can click and drag the arrow down out of the loop

  8. #8
    Forum Contributor
    Join Date
    08-04-2013
    Location
    Bucharest
    MS-Off Ver
    Office Professional Plus 2019
    Posts
    303

    Re: Loop prevents debugging

    This worked, thanks a lot!

+ 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. Nested Loop to highlight changes, any help debugging MUCH appreciated!
    By flintcs in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-01-2013, 10:02 PM
  2. Debugging and Loop issue
    By harshjog123 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-05-2012, 07:58 PM
  3. One macro prevents another from working
    By KevinThomas in forum Excel General
    Replies: 4
    Last Post: 05-07-2009, 05:32 AM
  4. loop does not work except in debugging step through mode
    By Nicole B in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-18-2005, 01:06 PM
  5. [SOLVED] MSG BOX PREVENTS setfocus HELP
    By helpless in iowa in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-18-2005, 09:06 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