none
Userform mouse event RRS feed

  • Question

  • I am trying to create a moving banner message in a userform textbox.  I would like it to cycle within a loop until a mouse click or key press occurs on any of the userform's controls.  I need some help in how to capture the mouse or key press event.
    Tuesday, August 12, 2014 4:00 PM

Answers

  • Private Sub UserForm_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
        MsgBox ("Test")
    End Sub

    Double click on the userform and select "MouseDown" event.

    Tada, you will have to write your scrolling code to stop in the sub.


    Please do not forget to click “Vote as Helpful” if the reply helps/directs you toward your solution and or "Mark as Answer" if it solves your question. This will help to contribute to the forum.

    • Marked as answer by BobGold Tuesday, August 12, 2014 6:01 PM
    Tuesday, August 12, 2014 5:55 PM