excel VBA break execution when there's no break key on keyboard

前端 未结 12 1746
耶瑟儿~
耶瑟儿~ 2021-01-01 11:42

I\'m just noticing that on my laptop (Dell XPS 15z) there\'s no BREAK key (no dedicated number keypad). I\'m running the debugger step-by-step and then when all seems fine,

12条回答
  •  無奈伤痛
    2021-01-01 12:28

    I found this thread and saw the solution that has the most votes, but then realized my laptop has no Pause, Break or ScrLk) keys. I tried other proposed solutions, like 'OnScreen Keyboard' or alternative key combinations, but those didn't work either.

    Then it hit me: if it's a phantom break point associated with particular line(s) of code, why not just get rid of the line(s)?

    So that's what I did:

    1. I cut the line(s) where execution was breaking.
    2. Ran the macro again (it didn't break this time)
    3. Pasted the line(s) again.

    It worked for me, when no other key combination (onscreen or physical) worked. Hope it helps someone!

提交回复
热议问题