PDA

View Full Version : MouseUp Event using Scroll Bars



andresfi
10-05-2010, 10:34 AM
Excel 2007
Newbie here. I'm trying to use a MouseUp event for a ScrollBar. The help for MouseUp event says:

"For a form, the user can generate MouseDown and MouseUp events by pressing and releasing a mouse button in a blank area, record selector, or scroll bar on the form."

I take this to mean the ScrollBar has a MouseUp event but I look at the evetns pulldown menu for the ScrollBar object in the IDE and there is no MouseUp event (ScrollBar1 is selected in the left pulldown). I even tried to paste the sample code from the same help page and change object to ScrollBar1 with no success (The code never triggers).

Private Sub ScrollBar1_MouseUp( ByVal Button As fmButton, ByVal Shift As fmShiftState, ByVal X As Single, ByVal Y As Single)



So Im all confused. My questions are:
-Does a MouseUp event exist in a ScrollBar?
-If yes, how do I invoke it?
-If no, how can I "simulate" such behaviour
Thanks in advance

andresfi
10-05-2010, 02:56 PM
So after doing some research I found out that other languages (C#, Delphi, etc) have a "EndScroll" argument as part of the Scroll event. My question is: does VBA have such a variable?
Help please. Thanks