With my new fancy Excel, the ibm aix 6.1 iso Ctrl Break no longer works.
You can interrupt a macro in, excel at any time by pressing Esc or Ctrl Break.
Click End to end the macro, click Debug to take a look at the macro in the Visual Basic Editor.
Also the Break key is triggered with the apple.This macro never stops because the part after 'Do While' will always be true (x will always be higher than 2).I write code and (as hard as this is to believe for many occasionally screw up, creating an infinite loop.The apple button along with the period button combination, but always setting up a way out of the loop should be your practice until you have debugged thoroughly.I've looked all over the web and it appears that Microsoft has a bug and doesn't care to fix.Place a command button on your worksheet and add the following code lines: Dim x As Long x 5, do While x 2 x x 1, loop.Although, reset automatically to xlInterrupt at the end of your macro, it's good practice (when using the previous code line) to end your macro with the following code line: happy tree friends handy game Application.Click the command button on the sheet.
Neither does the Esc key, etc.Note: If Excel freezes and you cannot interrupt your macro anymore, press Ctrl Alt Delete and close Excel.Add the following code line at the start of your code if you don't want users of your program to be able to interrupt your macro (not recommended).Setting a Break point somewhere such as the Next, aqw hack gold and ac or Do Loop will at least enable you not kill things completely.The following dialog box will appear:.Does anyone know a way to re-introduce the Ctrl Break function to VBA so if this happens in the future I don't lose work / force close?In the Visual Basic Editor, if this is happening to you a lot, get in the habit of creating a counter inside your loop that increments on each loop and set a Watch that Breaks when it changes value, or reaches a value.To halt this infinite loop, press Esc or Ctrl Break.