Excel VBA Macro Programming
Certain events in windows can pose problems for the debugger. They can complicate and confuse the debugging process. These events are discussed in the next sections.
Mouse Down
Mouse down is the event fired off when the user presses any mouse button down. This is before the button comes back up. If you break the code at this point, you will not get a mouse up event. A mouse up event occurs only when you press the mouse button and release it.
Key Down
Key down is the event fired off when the user presses any keyboard key down. This is before the key comes back up. If you break the code at this point, you will not get a key up event. A key up event occurs only when you press the key and release it.
Got Focus/Lost Focus
This event occurs when a user clicks your form or a particular control on the form to get the focus on that control. If you break the code at this point, you may get inconsistent results. Whether you do or not depends on whether your control had the focus at the point that the Break key was pressed.