Error message, "Can't execute code in break mode" when stepping through a procedure

USAMax

Well-known Member
Joined
May 31, 2006
Messages
846
Office Version
  1. 365
Platform
  1. Windows
I have not setup any error trapping. I am just stepping through a macro that I have been working with for about a year. Now, during most commands I get the message, "Can't execute code in break mode".

How do I turn this off so it doesn't keep prompting me?
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
I have not setup any error trapping. I am just stepping through a macro that I have been working with for about a year. Now, during most commands I get the message, "Can't execute code in break mode".

How do I turn this off so it doesn't keep prompting me?

I'm not sure you can turn it off. I ususally just step over that line of code to keep it from either stopping the macro if you click 'End' or jumping out of step mode to auto mode if you click continue. There might be a way to disable it, but I have never found it and stepping over the line that sends it to break mode is pretty easy to do.
 
Upvote 0
Hello USAMax,

While in the VBIDE (Visual Basic Integrated Development Environment), the system may not always be able to "break" due to processing requirements. You cannot turn this message off like you can in Excel.
 
Upvote 0
Thank you JLGWhiz but I am pressing F8 through my code to see that everything is working. I have been doing this since office 95 and I have never seen this before.

It doesn't happen on any of the logic lines of code such as an IF or DO WHILE, it only happens when the value of a cell is being changed or a different cell is selected.
 
Upvote 0
Leith, this is exactly what I have been looking for. Can you please tell me where to find the setting to turn it off?

My assumption was that it was in Tools, Options and the Editor tab. I tried turning EVERYTHING off but I did not have any luck. Do I have to restart Excel for the changes to take affect?
 
Upvote 0
Thank you JLGWhiz but I am pressing F8 through my code to see that everything is working. I have been doing this since office 95 and I have never seen this before.

It doesn't happen on any of the logic lines of code such as an IF or DO WHILE, it only happens when the value of a cell is being changed or a different cell is selected.

I don't get it very often myself, but if I write the code a certain way, it will crop up. The answer is as @Leith Ross said, it can't be turned off in vba. It is built into the applicaion to protect the app.
 
Last edited:
Upvote 0
Thank you both, but where do I turn it off? Please, it is slowing down my trouble shooting having to press F8 & SPACEBAR, F8 & SPACEBAR, F8 & SPACEBAR, F8 & SPACEBAR. So annoying, please... how do I turn it off?
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top