Mega Code Archive

 
Categories / VisualBasic Script / Forms
 

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