How can I have a msgbox popup with "Up" when someone clicks the up arrow and msgbox "Down" when they click the down button?
Thanks in advance.
Printable View
How can I have a msgbox popup with "Up" when someone clicks the up arrow and msgbox "Down" when they click the down button?
Thanks in advance.
Set the form's keypreview prop to true and try this code.
Code:Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyUp
MsgBox "Up"
Case vbKeyDown
MsgBox "Down"
End Select
End Sub
I think he meant when you CLICK the UP ARROW on the scrollbar!