I want to trigger some codes via middle clicking the mouse button.
However, the options for that button seem missing in Excel VBA?
Problematic red line.
Thanks a lot!
However, the options for that button seem missing in Excel VBA?
Code:
Private Sub UserForm_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
If (Button = xlPrimaryButton) Then Msgbox "Left Click"
If (Button = xlSecondaryButton) Then Msgbox "Right Click"
[COLOR=#FF0000] If (Button = xlMiddleButton) Then Msgbox "Middle Click"[/COLOR]
End Sub
Problematic red line.
Thanks a lot!