I'm writing a VBA program with multiple loops that tends to get hung up during the beta testing process. Is there a way to interrupt the code and jump to the vba window?
The ESC key doesn't work most of the time - in greys out the screen but that's about it. I think I've tried every key on the board but I'll try fn and fn + break. Thank you so much. I hate losing work and have put up with this state of affairs for far too long.
Whenever I am building an app I have a boolean variable in there call DebugFlag and at the begining of any intensive loops or crazy stuff I have a simple If DebugFlag then blah blah to limit the transactions it will perform. I use it throughout the code all over the place to really restrict what I am doing, also to print out SQL calls and various data points to the immediate window.
At the start of the code I simply have DebugFlag = True or False depending what I am doing
Thanks... I've used something like this with various results. The problem is it's hard to come up with a good set of debug logic for the problem I'm working on. But I think you're right. If KillLoop = 100000000 then step out. Not a bad suggestion.
I have found that with Excel 2010, one has to now use "Ctrl+Shift+Break" - you may want to make a note of that Gino, to use when you upgrade to Excel 2010 or later... unless Microsoft remedies it.
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.