I have a button that activates an animation. I want to stop the animation when I release the click. I have just this:
Private Sub AnimationButton_Click()
Call AnimationStart
End Sub
I tried searching, but I didn't find anything related to buttons.
CodePudding user response:
If you look in the list of events on your form for your button you will find Mouse_Down
and Mouse_Up
for the command button.
At the top of the code editor window select your command button on the left hand drop down list and the events available are in the right hand drop down list.
A program will receive a Mouse_Down event when the button is pressed. Then a timer starts and if it's released before the drag timer expires you will get a Mouse Up event followed by a click event.