Display Mouse Button, Shift key and Position X and Position Y : Mouse « Forms « VBA / Excel / Access / Word






Display Mouse Button, Shift key and Position X and Position Y

 
Sub CommandButton1_MouseDown(ByVal Button As Integer,
ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
    Cells(2, "A").Value = Button
    Cells(2, "B").Value = Shift
    Cells(2, "C").Value = X
    Cells(2, "D").Value = Y
End Sub

 








Related examples in the same category

1.Writing the Form_MouseDown Event Procedure
2.Check the mouse button in MouseDown event action listener