Runaway macro

bbower01

New Member
Joined
Aug 28, 2019
Messages
3
I have a macro running that seems to have run away and will not stop without control alt delete. Also ESC or CTRL-BREAK also don't work. IT's so weird. Sometime I will allow it to run over night and the next day it will be done and other times it will still be running. There is no rhyme or reason for this. HELP please.
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
51,409
Office Version
365
Platform
Windows
Welcome to the Board!

It is extremely hard to diagnose what the problem might be without seeing your code (and possibly some sample data).
Note that if your code has some loops that it never exits, you can add a maximum loop counter and have it exit when it hits that number.
 

bbower01

New Member
Joined
Aug 28, 2019
Messages
3
It’s supposed to copy a line and paste it somewhere else when it sees a true. I have the true flash red. I see the true but no copies are pasted.
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
51,409
Office Version
365
Platform
Windows
Like I said, without seeing the code, it is extremely difficult to help you. Can you please post your code? We may be able to spot some obvious flaws in it.
 

bbower01

New Member
Joined
Aug 28, 2019
Messages
3
Thx. Your response triggered an idea. I figured it out. Under error checking options. Enable iterative calc was set to high. Thx again
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
51,409
Office Version
365
Platform
Windows
You are welcome.
I am glad you were able to figure it out.
 

Eric W

MrExcel MVP
Joined
Aug 18, 2015
Messages
8,952
You can also add a DoEvents line in your loop. That should allow the Control-Break to work for you. Take it out when you're done debugging since it slows down the macro.
 

Forum statistics

Threads
1,081,450
Messages
5,358,754
Members
400,513
Latest member
sdrowsick

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top